views:

218

answers:

5

I am using VS 2008 to write my Javascript code ( mostly in JQuery). However the js file was not updated when I was done with the editing and pressed F5 to call out the debugger. I need to close my vs2008 and reopen it in order to see the latest changes in js file.

Any idea on how to fix this?

+1  A: 

Clear the cache in your browser. It's usually that it has a locally cached copy.

Kieron
A: 

js is heavily cached. Use a timestamp and append it to the url:

script.js?_s=12345678

this will force a refresh

NTulip
I'd disagree with that approach, the problem is with debugging. In the shipped site, you'd want the browser to cache the JS. With that solution you'd have to make sure you take the timestamp off the end before deployment. Just a thought.
Kieron
i agree - apply it where it makes sense like debugging
NTulip
A: 

clear the browser cache.. thats the usual culprit

A: 

If you can use Firefox instead, install the Web Developer Toolbar plugin, and you can disable caching for certain sites, i.e. the site you are developing.

Don
+2  A: 

Do a CTRL-F5 in the browser to force a hard refresh of all files the page is using.

Jack