Mobile app version of vmapp.org
Login or Join
Si4351233

: Is no cache meta tag bad for performance? I see many websites, seemingly arbitrarily adding the no cache meta tag on every page. Like this: <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> <META

@Si4351233

Posted in: #Expires #HttpHeaders #MetaTags

I see many websites, seemingly arbitrarily adding the no cache meta tag on every page.

Like this:

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="-1">


What is it good for and why are they doing it?

Is it bad or good for performance?

Will it prevent http expires headers to function and ultimately slow down a website?

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

4 Comments

Sorted by latest first Latest Oldest Best

 

@Phylliss660

I agree with James. Google in particular is giving more weight to page load times these days, and both caching and compression speed up page loads. They also improve user experience, especially on mobile, which is a good enough reason in itself to do it.
developers.google.com/speed/

10% popularity Vote Up Vote Down


 

@Sarah324

Using a no-cache meta tag is a bad idea. Page caching is valuable for both SEO and user experience. Caching will improve (lower) page load times. This means a user sees the content faster, which reduces abandonment rates - especially on mobile devices.

Ideally users will use settings to clear their browser cache, however this cannot be assumed. A preferred workaround is to leverage browser caching settings in your htaccess file. Add the following to your htaccess file:

##EXPIRES CACHING##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/js "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>

##Configure Entity Tags##
<FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(.gz)?$">
Header set Expires "Mon, 1 Jan 2020 01:00:00 GMT"
Header unset ETag
FileETag None
</FilesMatch>

10% popularity Vote Up Vote Down


 

@Rambettina238

These headers are used to discourage browsers or proxies from caching the page. For dynamically generated content the headers would be there to try and ensure site visitors are always hitting the server and so are always getting up-to-the minute content.

To answer your specific question, these headers may negatively affect performance because they may prevent caching, and caching is good for performance. But in practice they probably make little difference.

10% popularity Vote Up Vote Down


 

@Turnbaugh106

Caching speeds up repeat views and not first time visits so in terms of SEO value it means little since the first view time is the most important factor. Caching is good however because it means when people switch from page to page they are only loading the resources they need so this will boost user experience.

Using no-cache will disable the cache and <META HTTP-EQUIV="Expires" CONTENT="-1"> forces an immediate expiration on the file should the CMS or htaccess sets an expire.

Generally its not required and spoils user experience when setting up this way.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme