Thread: Meta Tag Cache
View Single Post
Old 06-20-2017, 02:49 AM  
porncrash
Confirmed User
 
porncrash's Avatar
 
Industry Role:
Join Date: Mar 2017
Posts: 59
It depends on what you want.
If you want to cache those pages you can add on each page a meta tag:
<meta http-equiv="Cache-control" content="public">

But keep in mind, that maybe not all users will see changes if you are using cache.

A better way is to use .htaccess to enable browser caching or even better configure it in your apache2 config.
You are more flexible with this.

Code:
<IfModule mod_expires.c> 
  ExpiresActive On
  ExpiresDefault "access plus 1 seconds"
  ExpiresByType text/html "access plus 1 seconds"
  ExpiresByType image/x-icon "access plus 2592000 seconds"
  ExpiresByType image/gif "access plus 2592000 seconds"
  ExpiresByType image/jpeg "access plus 2592000 seconds"
  ExpiresByType image/png "access plus 2592000 seconds"
  ExpiresByType text/css "access plus 604800 seconds"
  ExpiresByType text/javascript "access plus 86400 seconds"
  ExpiresByType application/x-javascript "access plus 86400 seconds"
</IfModule>
or

(this is my way to cache images, css etc.)
Code:
<FilesMatch "\.(?i:gif|jpe?g|png|ico|css|js|swf)$">

  <IfModule mod_headers.c>
    Header set Cache-Control "max-age=172800, public, must-revalidate"
  </IfModule>

</FilesMatch>
porncrash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote