Closed Bug 159775 Opened 23 years ago Closed 22 years ago

Cache doesn't seem to refresh properly

Categories

(Core :: Networking: Cache, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: dev, Assigned: Matti)

Details

Hi, I just don't know if I put that report in the right place. Please forgive as I'm a newcomer. Mozilla doesn't seem to compare properly files in cache with files on the server. (I use the "every time I view the page" cache comparison). Here's an example: I got a php script that change under user choice... That script displays a text and an image (temp/img.jpg). The uri of the image is always the same, but it contents is different. The text is correct (everytime it changes, it's ok), but the image is always the first image seen during the session. The reload button doesn't do anything. I got to do ctrl+shift+r to see the change (cause it bypass the cache. Is that right?). It means a comparison is done on the script, but not on the image file. Same problem if I try to see an image, then change the content of it during the session (by another mean). It doesn't update the cache (sometimes it does, if the second file is smaller!!!!). What's that? Did I miss something? A pref I shall modify? Thank you, as I'm not sure this is a bug. Olivier Gambier
Reporter: could you please supply an URL to the script you're talking about, so we can check the headers it sends and such? Also, considering that you're a newbie, I would suggest you to read Bug Writing Guidelines at http://www.mozilla.org/quality/bug-writing-guidelines.html to learn more about what kinds of information would be most helpful for us. You also might want to try Bugzilla Helper, which will guide you through submission process step by step, so you don't forget to put in any important information. The Helper can be found at http://www.mozilla.org/quality/help/bug-form.html Thanks for your help in testing Mozilla!
a) Build ID b) we need a testcase
Component: Browser-General → Networking: Cache
Sorry. Impossible to give you an uri to my files. I'm working on a local level only (apache server) for local purpose. As I pay my connection time, I can't afford being connected hours. Mozilla ID:2002053012 Test case: simply ask mozilla to display whatever_path/whatever_file.jpg. Then copy any other image to whatever_file.jpg. Try to reload. Same picture (most times: does actualize sometimes, I can't figure out why). Is the cache actualization done on file date? Thx.
When I just copy different images to the same name it updates as it should. But if I use touch to set identical file times then the cache gets confused. I use mozilla 1.0 on linux (with the image on an apache 1.3.23 web server). Here is the command I use to copy the image to the webserver (current directory): cp ~/bilder/asterix6.jpg a.jpg && touch -t 01011200 a.jpg And I can confirm that the cached image is used as long as you replace the image with a bigger file. When it is smaller then the new image is used. Probably someone checks the file size with < instead of !=. I don't know the mozilla codebase and it would take me hours to found this. For the reporter, just touch the file after you copy it to the webserver, that would do the trick. I would not be surprised if other browsers have the same problem so it's probably a good thing anyway.
Normal reloads only validate the top level page, if it has expired and the user's HTTP cache validation pref isn't set to "Never" or "Once per session". Normal reloads do not validate all documents referred to by the top level page. If the top level page is new, but you still get stale images, perhaps the original images haven't expired yet (since the original poster has his pref set to "every time"). Shift-reload *does* validate everything, through any proxy servers, back to the originating server. It also takes longer. This the user a couple of options for updating a page. I'm marking this bug as INVALID, but let me know if you something about the original report doesn't match my explanation.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.