html - How do I properly set up my header cache on my website? -
after following several links, trying different solutions adding
<meta http-equiv="expires" content="thu, 31 dec 2015 12:00:00 gmt">
to header , trying other solutions, none of them seem work. can't find proper guide on , how add properly. started doing after trying tome seo (search engine optimization) , getting error.
set far future cache policy in 15 requests
defining several days of cache retention static resources reduce load on server.
the expires header
some of resources using expires http header effective caching policy: best practice. however, should consider improving configuration make of caching mechanisms. here example of expires http header:
expires: thu, 25 dec 2014 20:00:00 gmt when deploy new version of website, remember rename static resources have been modified. in fact, if not change name, users keep resources stored in cache, corresponding old version. may find in unstable version of page. principle, called "versioning", applied on dareboost.com example. integrate version names of our files:
dareboost.min.20140101.js see yahoo! guidelines on subject.
settings
we recommend setting expires http header mentioned date between 2 days , 1 year.
this page contains 15 resources not have far expiration date:
see below:
<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" />
Comments
Post a Comment