Not Caching Code
-
To test in a certain browser (whose name must not be mentioned) I am constantly frustrated by the fact that my JS is cached and the only way to test a change is to reload the browser. Is there a way to say "reload, even the JS"?
-
Ctrl+F5 doesn't work?
IE is known to be very aggressive in caching. Had it been on a web-server you'd set a HTTP header for the JS document to no-cache. But since this is run locally I'm not sure.
Maybe adding the no-cache META tag to the HTML will work? (I'm not sure if that will affect both the external documents or just the HTML document - I suspect the latter.)
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> -
@thomthom said:
Ctrl+F5 doesn't work?
Thanks for your help, but Ctrl+F5 doesn't do it. Neither does the meta. Neither does the meta if you insert it before and after the body, per Joe Burns.
However, one thing works! Do not load the HTML in the browser (tho that seems sensible if you want to test HTML). Use your model's Ruby code to load it in a WebDialog. Then your cycle is edit, load ruby, view changes.
This works with script in the HTML or with script in a linked .js.
In conclusion, Google (hello, Google? you there Google?) has chosen its browser without much wisdom. (That's more polite than my actual feelings.) The only better choice would be any other choice. PLEASE!
-
Meta tags only goes in the HEAD - as the very first tags.
@martinrinehart said:
The only better choice would be any other choice. PLEASE!
Amen!
When I'm writing plugins with webdialogs - when I only change the JS code (external) I think the only thing I did was to activate the webdialog and press F5 / Ctrl+F5...
Maybe it's some local setting...
-
@thomthom said:
Meta tags only goes in the HEAD - as the very first tags.
I agree, except:
http://www.htmlgoodies.com/beyond/reference/article.php/3472881
-
That's a like a very hacky wacky workaround. And the site talks about IE5 and Navigator... a wee bit old resource.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement