Forum Moderators: open
I expounded on the virtues of cache, but he was pretty adament about the situation. So I told him that I could alter the code so that it wouldn't be cached in people's browser, by inserting the meta tags
META HTTP-EQUIV="Expires" CONTENT="0"
META HTTP-EQUIV="Pragma" CONTENT="no-cache"
in the head section. He liked this idea and wants me to insert these in all of the pages throughout his site.
Is there any good reason not to do this?
I want it to use the cache copy...rather than going to server each time....
So i coded in the following
TEST.ASP
<%Response.AddHeader "Cache-Control", "public"%>
<%Response.AddHeader "pragma", "public"%>
<%Response.AddHeader "Expires=15"%>
NOW all my pages at moment are HTML pages
Do i have to change all these to ASP FILES.
The meta tags are useful, but the HTTP is better because proxy servers and such do NOT parse HTML and so never get the meta tags. HTTP headers are always parsed if the browser understands HTTP 1.1.
Richard Lowe
Is there any good reason not to do this?
Well from a surfers perspective it can really slow things down. I still use 56k to surf and when sites do that I find it very irritating because it takes so long to reload a page that I did not want reloaded. I have even stopped going to some sites that do that.
I have not found that to be the case. I use the no-cache tag on each of over a hundred pages and my server status codes report very few partial page loads.
Of course I keep my pages under 40k (w/images) and do not use SSI that does tend to slow page loads.
BTW, it doesn't reload a page.
I do not use cookies and rely upon analyzed log files 100% for visitor data. Eliminating browser caching is a great help in getting a more valid count of page loads and other information. Of course this tag does not affect cache bins of IPs and proxies.
I think some se's decrease rankings on pages with the no-cache tag.
That seems a little extreme. And it would probably be enough to change my client's mind about this, since the initial change was on his home page. He's got a little "What's New" section to point people to new/updated pages.
i use the no-cache meta-tag on nearly all my html docs because
i'm tired of letting a user view content that is outdated.
cacheproxies can request documents from my server using the
HTTP_IF_MODIFIED_SINCE variable:
the whole document is only resent to the cacheserver if it has changed
since it was last requested
btw, if one hits the refresh button this same IF_MODIFIED_SINCE variable
is used to do the request