Results 1 to 1 of 1

Thread: HOWTO: Handle Website Caching

  1. #1
    Join Date
    Feb 2004
    Posts
    4,877
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default HOWTO: Handle Website Caching

    If you find that static website files are not updating after you upload them, the problem is usually caused by your browsers cache.

    Our servers ask your website visitor's browsers to save static content (html, javascript, css etc...) in their cache, this speeds up your website, saves your bandwidth and helps keep server load to a minimum.

    However, if you need to force a reload of all static content, simply press CTRL + F5 in your browser and a forced cache-less reload should be carried out. In the event of this not solving the problem, you can trick your browser into the re-caching the problematic file by making it think it is accessing a non-static file, this is done by adding a random querystring argument like this:

    File:
    Code:
    http://www.yourdomain.com/myfile.html
    Reload URL:
    Code:
    http://www.yourdomain.com/myfile.html?randomnumbers=43534543
    Or for the reloading of a directory root...

    Directory:
    Code:
    http://www.yourdomain.com/
    Reload URL:
    Code:
    http://www.yourdomain.com/?randomnumbers=43534543
    Additionally, to stop your website visitor's browsers from caching static HTM/HTML files all together - the following meta tag should be added to the HTML header:

    Code:
    <meta http-equiv="PRAGMA" content="NO-CACHE">
    Last edited by Warren Ashcroft; 24th December 2007 at 08:11 PM.
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. HOWTO: Create a Temporary "Pre DNS Propagation" URL
    By Warren Ashcroft in forum Technical Support
    Replies: 5
    Last Post: 29th April 2008, 08:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •