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]


  • $phpwcms['allow_cntPHP_rt'] = 1;

set_meta('pragma',        'no-cache', true);
set_meta('cache-control', 'no-cache', true);
set_meta('expires',       '00',       true);

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

$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" />';

english/technics/tips/cache-meta-tags.txt · Last modified: 2018/06/03 18:09 (external edit) 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