Tech Support Guy banner
Status
Not open for further replies.

Fresh Page Reload

1K views 13 replies 2 participants last post by  SpywareDr 
#1 ·
Hello All,
What is the best code to put at the top of a web page to ensure the page is fresh & not from the Cache, I may have asked this before, thank you as always,
Graeme
 
#3 ·
Thank you,
If I use
Standard Cache-Control directives that can be used by the client in an HTTP request.
Cache-Control: max-age=<seconds>
Cache-Control: max-stale[=<seconds>]
Cache-Control: min-fresh=<seconds>
Cache-Control: no-cache
Cache-Control: no-store
Cache-Control: no-transform
Cache-Control: only-if-cached
how many seconds to I need to add as in <seconds>?
 
#10 ·
It's in the mnot.net page I linked you to above:

www.mnot.net/cache_docs/ - Caching Tutorial - for Web Authors and Webmasters
HTTP headers are sent by the server before the HTML, and only seen by the browser and any intermediate caches. Typical HTTP 1.1 response headers might look like this:

HTTP/1.1 200 OK
Date: Fri, 30 Oct 1998 13:19:41 GMT
Server: Apache/1.3.3 (Unix)
Cache-Control: max-age=3600, must-revalidate
Expires: Fri, 30 Oct 1998 14:19:41 GMT
Last-Modified: Mon, 29 Jun 1998 02:28:12 GMT
ETag: "3e86-410-3596fbbc"
Content-Length: 1040
Content-Type: text/html​

The HTML would follow these headers, separated by a blank line. See the Implementation sections for information about how to set HTTP headers.

...
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top