views:

31

answers:

1

Please look at this small test:

http://www.karapuz.by/media/js/ajax-GET-caching-test.html

It seems that Opera (mine is 10.10), in contrast to IE, FF, GC, and Safari, is not caching the ajax response, even if it is explicitly told to do that. Any ideas?

A: 

It seems you need to remove the expiration of your header.

Knu
Thanks, Knu. I tried to remove it--no changes, Opera still re-requests.Additionally, I didn't understand why the expiration header must be removed, if it is a standard mean to control the client's cache.
Knu
Ok, I tried to remove both headers, but still Opera makes recurring requests. Again, why not to use cache headers? Is something wrong with them if I want to tell the client browser to use its cache?As a workaround for Opera maybe I could use hidden iframes.
Did you clean the cache before?
Knu
No I didn't. Why?
It now seems that the problem is in the jQuery library. I made another test http://www.karapuz.by/media/js/ajax-GET-caching-test2.html , it uses more low level XHR object, not the jQuery's "ajax" as it was in the first test. And now Opera is fine!