View Full Version : Ajax image refresh problem

12-02-2009, 04:39 AM

I am trying to create a page for a application that uses a technique where a page refresh is generated by an ajax call followed by an innerhtml replace on the main page div.

Unfortunately this strange way of refreshing pages is leading to an issue with an image I am trying to display. Every time it refreshes the images flashes off and then is redisplayed, there are other elements on the page( smaller images, text etc... ) and they do not seem to be affected.

The image is not large, only 23 k, but it is the only one affected. If I run the page on firefox I do not encounter this issue which makes me think that is a lovely IE feature that forces the image to be retrived from the server on every innerhtml replace instead of from the cache.

I am using IE8 to test this, any suggestions are greatly appreciated as I have been trying to fix this for a while.


12-02-2009, 04:04 PM
On the contrary, the IE's "lovely feature" is to load the AJAX response from the cache rather than from the server.

It is hard to say without a link to test page.

12-03-2009, 12:02 AM
If IE does try to refresh from the cache then why would it cause the image to flash on and off when viewing the same page in firefox does not have this problem.

I have also read there are numerous problems with the way that IE handles ajax requests and caching, which is what this appears to be an issue with.

I cannot provide a link to the page as it is within an internal network.