Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html5 meta tag cache-control no longer valid?

Tags:

html

meta-tags

How do I define

<meta http-equiv="cache-control" content="no-cache" /> 

in HTML5? It is no longer valid according to the W3C Validator and the documentation.

like image 397
powtac Avatar asked Jul 12 '11 13:07

powtac


People also ask

How do I control HTML cache?

To use cache-control in HTML, you use the meta tag, e.g. The value in the content field is defined as one of the four values below. HTTP 1.1. Allowed values = PUBLIC | PRIVATE | NO-CACHE | NO-STORE.

Are meta tags cached?

When we use the meta tag “cache-control” with the value “no-cache”, we prevent caching of the webpage and that means the webpage is reloaded for every page view. This may lead to longer loading times but is helpful in cases where webpage is being updated frequently.

What is http equiv cache-control?

An alternative to the Cache-Control HTTP header is to use META HTTP-Equiv tags. These tags produce the same result as the equivalent HTTP header when used within your channel pages and are processed by the M-Business Sync Server and displayed in M-Business Client.

What is meta http equiv Pragma content no-cache?

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> This directive indicates cached information should not be used and instead requests should be forwarded to the origin server.


1 Answers

Putting caching instructions into meta tags is not a good idea, because although browsers may read them, proxies won't. For that reason, they are invalid and you should send caching instructions as real HTTP headers.

like image 148
wandarkaf Avatar answered Sep 22 '22 14:09

wandarkaf