I dont want my HTML5 pages to be cached , so i am using these tags under my HTML file
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script src="js/jquery-1.10.2.min.js"></script>
</head>
When i validated these with http://validator.w3.org/check ,
its saying as
Bad value cache-control for attribute http-equiv on element meta.
<meta http-equiv="cache-control" content="max-age=0" />
Bad value cache-control for attribute http-equiv on element meta.
<meta http-equiv="cache-control" content="no-cache" />
Bad value expires for attribute http-equiv on element meta.
<meta http-equiv="expires" content="0" />
Bad value expires for attribute http-equiv on element meta.
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
Bad value pragma for attribute http-equiv on element meta.
<meta http-equiv="pragma" content="no-cache" />
Could you please let me know how to resolve this ??
Meta equiv cache-control < Meta HTTP-EQUIV = "Cache-Control" The meta cache control tag allows Web publishers to define how pages should be handled by caches. They include directives to declare what should be cacheable, what may be stored by caches, modifications of the expiration mechanism, and re-validation and reload controls.
Bad value expires for attribute http-equiv on element meta. Bad value expires for attribute http-equiv on element meta. Bad value pragma for attribute http-equiv on element meta.
Bad value “cache-control” for attribute “http-equiv” on element “meta”. The value cache-control is no longer a valid pragma directive. A better alternative is defining cache-control as an HTTP header.
HTML5 has very small set of values available for http-equiv attribute for meta property. It's not that you can take any possible HTTP header and use it this way. Although browser may and support many non-standard values, it's simply non spec-conformant.
HTML5 has very small set of values available for http-equiv
attribute for meta
property. It's not that you can take any possible HTTP header and use it this way. Although browser may and support many non-standard values, it's simply non spec-conformant.
Information here: http://www.w3.org/TR/html5/document-metadata.html#standard-metadata-names in p. 4.2.5.3 Pragma directives.
What you can probably do is - depending on used server technology - add those headers to HTTP response. How - this depends on whether your page is dynamically generated or is a static file. In the second case it depends on server software capabilities.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With