Weird .js file caching in firefox / tomcat / eclipse

I am developing .jsp

with eclipse and tomcat.

My is .jsp

outputting html to pull some javascript from the file .js

. jsp

outputs code that hooks up a function mapTool

to the mousedown event. imfMapFunctions5101.js

contains the mapTool (e) function.

Changes made to the .js file do not affect execution in Firefox, although they are executed when launched in IE.

in .jsp:

out.println("<script language=\"JavaScript\" type=\"text/javascript\" src=\"imfMapFunctions5101.js\"></script>");  

....    

out.println("function startup() {");
      out.println("  hideLayer(\"loadMap\");");
      out.println("  if (document.layers) {");
      out.println("    document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);");
      out.println("  }");
      out.println("  document.onmousedown = mapTool;");
      out.println("  **alert(document.onmousedown);**") //pops up the event code in the browser

; 
.......

      

Javascript event code in imfMapFunctions5101.js

:

function mapTool (e) {
    **alert('mapTool'); //my alert**

  if (dTools.activeTool == "Drill Down Identify") {
    showLayer("loadData");
.....

      

when alert(document.onmousedown);

appears in IE I can see the event code with my additional warnings:

function mapTool (e) {
    **alert('mapTool'); //my alert**

  if (dTools.activeTool == "Drill Down Identify") {
    showLayer("loadData");

....

      

In firefox, the event code that appears does NOT contain my warning:

function mapTool (e) {

  if (dTools.activeTool == "Drill Down Identify") {
    showLayer("loadData");

      

It is like caching a file and firefox insists on getting the old cached .js file. Pretty sure that's not what's going on. Tried updating the .jsp timestamp by renaming the javascript to a dummy name and then back again.

What's happening?

ANY help is greatly appreciated?

+1


source to share


1 answer


try refreshing the page clear cache: slide + click refresh button or clear cache under tools-> clear private data



+3


source







All Articles