[lp_header_nocache]

Description

Link: [lp_header_nocache]
Author: Bil Corry
Category: Technical
Version: 8.x
License: Public Domain
Posted: Dec. 02, 2005
Updated: Feb. 05, 2008
More by this author...

Via http header, sets the content to immediately expire, no caching.

Parameters

none


Sample Usage

lp_header_nocache;  // that's it!
						

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
[

define_tag:'lp_header_nocache',
	-description='Via http header, sets the content to immediately expire, no caching.',
	-priority='replace';
	
	$__http_header__->(replace: 'HTTP/1.0', 'HTTP/1.1');
	$__http_header__ += 'Expires: Thu, 11 Jun 1998 13:17:30 GMT\r\n';
	$__http_header__ += 'Last-Modified: ' + (date_localtoGMT: date )->(format:'%a, %d %b %Y %H:%M:%S') + ' GMT\r\n';
	$__http_header__ += 'Cache-Control: no-store, no-cache, must-revalidate, no-transform, max-age=0, post-check=0, pre-check=0\r\n';
	$__http_header__ += 'Pragma: no-cache\r\n';
	if: !$__http_header__->(contains:'vary:');
		$__http_header__ += 'Vary: *\r\n';
	/if;
	if: !$__http_header__->(contains:'ETag:');
		$__http_header__ += 'ETag: "'Lasso_UniqueID'"\r\n';
	/if;
/define_tag;

]

 

Comments

none

Email:


Password:



Newest

Most Popular

Support tagSwap.net