Results 1 to 3 of 3

Thread: Firefox cache Javascript issue

  1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    6

    Default Firefox cache Javascript issue

    Hi,

    My application has several Javascript pages. They work fine with both Firefox and IE. However, when I update my Javascript page (for example, a page called user.js that contains user name and password fields and the new user.js page adds role field to it), I won't see the update on Firefox unless I clean the browser cache. IE7 seems to pick it up just fine.

    My question is - Is there a place that I can ask Firefox not to cache my Javascript pages?

    Thanks.

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256

    Default

    What you can do is append something to the end to force it to refresh:

    Code:
    <script type="text/javascript" src="myscript.js?v=1.1"></script>

  3. #3
    Ext User
    Join Date
    Apr 2008
    Posts
    6

    Default

    Works like a charm. Thank.

Posting Permissions

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