Ajax Problems in IE
Hey all. This isn't really a question so much as a "watch out for".
I spent half a day's work yesterday trying to figure out some horrible problem that my page was having. Basically, it would read a table of data from my database, and then depending on whether i click add or remove a row, it would do so, and read the new table of data, all using Ajax. This worked fine with firefox and safari, but I was having the weirdest problems with internet explorer. I would click the 'add' button, and it would pull up rows that weren't even in the database anymore as of hours ago. So immediately I knew this was some sort of cache problem and I found this page:
The important part being this regarding Ajax:
Most of the implementations also realize HTTP caching. Internet Explorer and Firefox do, but there is a difference in how and when the cached data is revalidated. Firefox revalidates the cached response every time the page is refreshed, issuing an "If-Modified-Since" header with value set to the value of the "Last-Modified" header of the cached response.
Internet Explorer does so only if the cached response is expired (i.e., after the date of received "Expires" header).
I used the third work around on that page, change all requests to use POST instead of GET.
I hope this saves someone hours of frustration!
It only has to work long enough to get another browser I wouldn't even trust it to do that right (better check that MD5).
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)