In comp.lang.javascript message <a7a73088-8603-4ead-aeab-a754394dea21@k7
g2000hsd.googlegroups.com>, Sun, 24 Aug 2008 10:15:24,
Ma************@gmail.com posted:
>I've got the usual suspects on KDE: Firefox, Konqueror and Opera. All
aggressively cache .js files. I've not figured out a way to remove a
cached .js without closing the browser and restarting it.
This makes them useless while coding .js files. My solution (kludge?)
is to leave what will become .js between <script</scripttags in
the HTML until it feels like it is fully-featured and totally debugged
and then move it into a .js. As "fullly-featured and totally debugged"
is a rare condition, I've got more JavaScript in HTML than in .js,
where it belongs.
Is there a better way? A browser smart enough to compare time stamps
and reload .js as necessary?
Try writing the '<script type="text/javascript" src="...js"></script>'
with 'document.writeln', but appending to "...js" '+ +new Date()'. That
might defeat the caching.
Or write a utility to rename the ...js file and change the reference to
it correspondingly.
I assume you've tried shift-reload or similar?
Or run a Windows emulator with a Windows browser in it.
--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/- FAQqish topics, acronyms & links;
Astro stuff via astron-1.htm, gravity0.htm ; quotings.htm, pascal.htm, etc.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.