简体   繁体   中英

Refrashing the Javascript File without page refresh.

I am working on a very complex web site which is wizard based and have many JavaScript files included.

Now problem is if I pass through many step and at some later stage I find a JavaScript problem, as I fix it I have to load the page again and as I load the page again the Wizard will be started from step one again.

What I want is if I make JavaScript change in a file, there should be a possibility to refresh the JavaScript file through Firebug or something like it.

Thanks a lot.

No, not really. You could try to change the <script> 's src attribute to something like /your/script.js?timestamp=1234567890 , but this doesn't give a reliable guarantee that the script will be loaded again.

You could add another script element into the DOM, but then you'd have two very similar scripts loaded at the same time, which may be problematic.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM