Changing and reloading included .js files

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

    Changing and reloading included .js files

    Hi

    I just came a problem with JS on a site - I updated my .js file for
    the site, it is included as follows:

    <link rel="stylesheet " href="whatever. css" type="text/css">
    <script type="text/javascript" src="whatever.j s"></script>

    Problem: IE does not automatically reload the .js file (nor .css) but
    uses a cached version - which caused the site to fail this morning.
    I know users have to press F5 to reload, but is there a way to _force_
    reload, so¨my (stupid) users do not have too?

    WBR
    Sonnich
  • Thomas 'PointedEars' Lahn

    #2
    Re: Changing and reloading included .js files

    jodleren wrote:
    I just came a problem with JS on a site - I updated my .js file for
    the site, it is included as follows:
    >
    <link rel="stylesheet " href="whatever. css" type="text/css">
    Your stylesheet is irrelevant here. A stylesheet is not a script (at least
    not in non-NN4).
    <script type="text/javascript" src="whatever.j s"></script>
    >
    Problem: IE does not automatically reload the .js file (nor .css) but
    uses a cached version - which caused the site to fail this morning.
    I know users have to press F5 to reload, but is there a way to _force_
    reload, so¨my (stupid) users do not have too?
    Covers the how's and why's of Web caching for people who publish on the Web. With FAQs.


    Despite statements to the contrary, this works also with non-Apache servers.


    PointedEars
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann

    Comment

    Working...