Image caching on 3.1
g.myersJul 18 2008 — edited Jul 18 2008I've been getting a problem with Image Caching in my environment.
The image are ones loaded as WORKSPACE_IMAGES, and served through wwv_flow_file_mgr.get_file. I'm using the EPG on 11g Windows 64bit.
In IE7, the symptom was that I'd get the images first time, then just a blank from then on. I'd see them again after a Ctrl-F5, but then they would go again. My IE7 goes through a proxy.
Firefox 3 (windows with no proxy) initially didn't seem to have a problem. However, I found that by pointing the UTL directly at the image, I could get a 'strobe' effect on refresh. It would load, then give a 404, then load, then 404.
http://.../apex/wwv_flow_file_mgr.get_file?p_security_group_id=...&p_fname=Red.png
I hacked around a bit, looking at headers and seeing what I could get directly out of wwv_flow_file_mgr.get_file. It seems that, when an image was in the cache and the request was going with
If-Modified-Since: Mon, 07 Jul 2008 14:59:53 GMT
If-None-Match: "16238153309801622454656004044"
wwv_flow_file_mgr.get_file seems to generate a response with
Last-Modified: Mon, 07 Jul 2008 14:59:53 GMT
Etag:
I think it is indicating that the cached image should be re-used. But without the Etag value it wouldn't show the image and Firefox gave a 404. I think at that point the image gets removed from the cache (as the server has said the file doesn't exist).
Then the next request would go out without the cache details, the image gets found okay and displayed.
If I intercept the wwv_flow_file_mgr.get_file response and set the Etag value with that from the original If-None-Match, then it all seems to work.
Obviously wwv_flow_file_mgr.get_file is wrapped. Can anyone confirm if my guess is right, and that the Etag isn't (always or sometimes) set when returning from a image which has matched the cache setting ?
Firefox is workable as there's only problems when I do something odd.
IE7 is less easy, though I can move the images out to the /i/ drive location (all the theme images, buttons etc work fine).
PS. Apex Version is 3.1.1.00.09
Message was edited by:
g.myers