[lp_header_noPrefetch]

Description

Link: [lp_header_noPrefetch]
Author: Bil Corry
Category: Utility
Version: 8.5.x
License: Public Domain
Posted: Aug. 24, 2006
Updated: Aug. 26, 2006
More by this author...
Prevents the page from being served due to prefetching.

Requires [lp_client_isPrefetch]

Parameters

none


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.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[

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

none

Email:


Password:



Newest

Most Popular