Lasso Soft Inc. > Home

[lp_header_noPrefetch]

Linklp_header_noPrefetch
AuthorBil Corry
CategoryUtility
Version8.5.x
LicensePublic Domain
Posted24 Aug 2006
Updated26 Aug 2006
More by this author...

Description

Prevents the page from being served due to prefetching.

Requires [lp_client_isPrefetch]

Sample Usage

// call this at the beginning of a page
lp_header_noPrefetch;

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

[

define_tag:'lp_header_noPrefetch',
	-description='Aborts the page if the page is prefetched by a browser.',
	-priority='replace';

	// more info on prefetching:
	//   http://webaccelerator.google.com/webmasterhelp.html
	//   http://www.mozilla.org/projects/netlib/Link_Prefetching_FAQ.html#Do_prefetched_requests_contain_a
	//   http://david.backpackit.com/pub/37983
	
	if: lp_client_isPrefetch;
		content_header = 'HTTP/1.1 403 FORBIDDEN\r\n';
		content_header += 'Content-Type: text/plain; charset=UTF-8\r\n';
		content_body = 'Prefetching this page is not allowed by the server.';
		abort;
	/if;
	
/define_tag;

]

Comments

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft