Lasso Soft Inc. > Home

[lp_header_nocache]

Linklp_header_nocache
AuthorBil Corry
CategoryTechnical
Version8.x
LicensePublic Domain
Posted02 Dec 2005
Updated05 Feb 2008
More by this author...

Description

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

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.

[

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

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