user160820
user160820

Reputation: 15200

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.

Upvotes: 1

Views: 299

Answers (1)

Piskvor left the building
Piskvor left the building

Reputation: 92752

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.

Upvotes: 2

Related Questions