www.webdeveloper.com
Results 1 to 5 of 5

Thread: Browser Cache - Inactivate

  1. #1
    Join Date
    Jan 2018
    Posts
    19

    Browser Cache - Inactivate

    Hi all,

    -I use for testing chrome + firefox + ie
    -I am using the IIS Server on Windows.
    -I currently often change my code: html + CSS + javascript.

    Challange:
    I often need to delete the cache of the browser, to see recent changes.

    Deleting the cache again and again is time consuming.

    How can I avoid this on my computer?

    Thx

  2. #2
    Join Date
    Dec 2005
    Location
    TX
    Posts
    7,931

    Question

    Have you tried F5 or Shift-F5?

    My last resort is to clear the browser history.

  3. #3
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,762
    add a ? with a random number on the URL eg, index.html?98761234 and as long as the numbers are random, not been used previously, this is to the browser a new resource, so you should avoid cache issues.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  4. #4
    Join Date
    Jan 2018
    Posts
    19
    F5 Shift+F5 does not work.

    I have 1 another option.
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />

  5. #5
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,762
    you also have location.reload( true ); in JavaScript

    by far the simplest method is manually type a random number as part of a URL query string as I said earlier, requires no additional code just the effort to type in the address bar.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

Thread Information

Users Browsing this Thread

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

Posting Permissions

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

"

"