META-Tags: "Cache-Control", "Pragma" & "expires"

Set up META-Tags: “Cache-Control”, “Pragma” und “expires” in a template or CP:



Forum: ...und gleich ein wieder Problem mit dem Kontaktformular [DE]

Condition:/config/phpwcms/conf.inc.php

  • $phpwcms['allow_cntPHP_rt'] = 1;


[PHP]
set_meta('pragma',        'no-cache', true);
set_meta('cache-control', 'no-cache', true);
set_meta('expires',       '00',       true);
[/PHP]


In older systems where the function “set_meta (…)” is not available:

[PHP]
$GLOBALS['block']['custom_htmlhead']['metapragma']        = '  <meta http-equiv="pragma" content="no-cache" />';
$GLOBALS['block']['custom_htmlhead']['metacache-control'] = '  <meta http-equiv="cache-control" content="no-cache" />';
$GLOBALS['block']['custom_htmlhead']['metaexpires']       = '  <meta http-equiv="expires" content="0" />';
[/PHP]


english/technics/tips/cache-meta-tags.txt · Last modified: 2018/06/03 18:09 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0