Forcing page refreshes, is it bad practice?

J

Jose

I have someone asking me for the html code to force a browser to
fetch a page from the server instead of using a cached version. Apart
from wanting to find the code out, I have a vague recollection that
it's not advised, but can't be sure.

It was probably started by me... I wanted to ensure that an excel file
was fetched fresh from the server. Since an excel file is not an HTML
file, there's no place to put HTML headers (without access to the
server, which does it's own thing).

You can't =force= a browser to do anything - you can just suggest. In
the case of an excel file, you can't even suggest.

Jose
 
D

David Dorward

xyZed said:
I have someone asking me for the html code to force a browser to
fetch a page from the server instead of using a cached version.

No such code. That is the job of HTTP headers.

http://www.mnot.net/cache_docs/
Apart from wanting to find the code out, I have a vague recollection that
it's not advised, but can't be sure.

It depends. It is useful if the content is likely to change often. It is a
waste of bandwidth (time and money) if the content doesn't change often
(although there is the 304 Not Modified response).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,526
Members
44,997
Latest member
mileyka

Latest Threads

Top