Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 29th, 2008, 12:05 AM
FAQ server
Guest
 
Posts: n/a
Default FAQ Topic - How do I force a reload from the server/prevent caching? (2008-08-29)

-----------------------------------------------------------------------
FAQ Topic - How do I force a reload from the server/prevent
caching?
-----------------------------------------------------------------------

To reload a page, use location.reload(). However, this depends
upon the cache headers that your server sends. To change this,
you need to alter the server configuration. A quick fix on the
client is to change the page URI so that it contains a unique
element, such as the current time. For example:
` location.replace(location.href+'?d='+new Date().valueOf()) `
If the location.href already contains a Query String, use:
` location.replace(location.href+'&d='+new Date().valueOf()) `

http://www.mnot.net/cache_docs/

http://docs.sun.com/source/816-6408-10/date.htm


--
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javascript FAQ is at http://jibbering.com/faq/index.html.
The FAQ workers are a group of volunteers. The sendings of these
daily posts are proficiently hosted by http://www.pair.com.

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles