[Webkit-unassigned] [Bug 51286] XMLHTTPRequest should invalidate cache unless method is GET

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 17 20:50:35 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=51286





--- Comment #2 from Nathan Vander Wilt <natevw at yahoo.com>  2010-12-17 20:50:35 PST ---
I've been poking at this some more, and can't quite figure out what's going on. As far as XHR is concerned, WebKit *does* do proper cache invalidation. It seems like there's some sort of DOM cache actually causing the issue I'm having.

We use AJAX to load a server-generated form into a dialog. This form displays an image from a static URL, and the user can update the image at this URL via the form. However, when the form is fetched again later the image display is the old image. This makes sense, because as far as the browser knows the image has not been updated (only the form URL has been POSTed to).

So to work around this, I tried to use XHR to POST to the image URL, as well as send a GET with Cache-Control: no-cache. These behave as expected, but when I fetch the dialog HTML and add it to the DOM, I still get the old image. This is the bug.

There is, however, one way I can get the new image to show while debugging: if I open the dialog HTML directly in a new window, it has the new image. If I *then* show the dialog in context (without doing anything to refresh the main app page) it too gets the new image.

I understand I can use a variety of methods and tricks to avoid cache this image, but the client should be able to successfully have the rendered DOM update when the cache is manually invalidated through JavaScript.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list