blackfyre / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

Internet Explorer's Cache Gets Wonky In Some Cases Without Cache Busting Code -- Investigate #149

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Right now in _SVGObject._fetchURL I have the following code:

// bust the cache for IE since IE's XHR GET requests are wonky
    if (isIE) {
      url += (url.indexOf('?') == -1) ? '?' : '&';
      url += new Date().getTime();
    }

I'd like to remove this because it means that reusing an SVG file on the
page doesn't pull it from the cache, lessening performance (see Issue 143).
However, when I remove that, the following breaks in an unexpected way:

* If you load tests/browser-tests/test_js1.html into IE (IE 7 in my case),
the page loads correctly and everything passes. However, if you then click
the Reload button, all of the dynamically created SVG OBJECTs tests fail
because the onload listener for each doesn't fire. Adding back in the IE
cache code above makes them work correctly.

I don't like this, because I don't understand what is going on here. This
bug is a reminder to investigate what is going on with IE cache around
these SVG files, since I would like to remove the cache busting code above.

Original issue reported on code.google.com by bradneub...@gmail.com on 6 Jul 2009 at 9:48

GoogleCodeExporter commented 8 years ago

Original comment by bradneub...@gmail.com on 6 Jul 2009 at 9:48

GoogleCodeExporter commented 8 years ago
I'm seeing a similar thing happening in my protovis patch: it works in IE but 
when you do a page refresh it stops 
working due to SVGLoad not being fired.

Original comment by jason.da...@gmail.com on 24 Nov 2009 at 10:30

GoogleCodeExporter commented 8 years ago
Hi guys,

i managed to redraw svg (or draw it on load) by using :
svgweb._processSVGScript(document.getElementById('petrinet')); 'petrinet' being 
the
id of the svg script element.

Hope it helps you guys!

best regards,

Sebastiaan

Original comment by sebastia...@gmail.com on 19 Apr 2010 at 7:36