FAQ Topic - How do I force a reload from the server/prevent caching? (2008-05-02)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • FAQ server

    FAQ Topic - How do I force a reload from the server/prevent caching? (2008-05-02)

    -----------------------------------------------------------------------
    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.replac e(location.href +'?d='+new Date().valueOf( )) `
    If the location.href already contains a Query String, use:
    ` location.replac e(location.href +'&d='+new Date().valueOf( )) `

    Covers the how's and why's of Web caching for people who publish on the Web. With FAQs.





    --
    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.javas cript 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.

  • Ugo

    #2
    Re: FAQ Topic - How do I force a reload from the server/prevent caching? (2008-05-02)

    -----------------------------------------------------------------------
    FAQ Topic - How do I force a reload from the server/prevent
    caching?
    -----------------------------------------------------------------------
    Excuse me, but is not sufficent loaction.reload (true)?

    Comment

    Working...