3

I am facing weird issue with file uploads. When I upload a new file to publicly visible folder, I can see it instantly in anonymous mode. But if i try to access it in non-anonymous mode, the server responds with 404 unless I do hard refresh (ie ctrl + F5 for Mozzila).

I have already disabled cache control headers for that folder in apache, but that did not seem to resolve the issue. It seems to me that the apache is storing information that "there is actually no file at requested url" and serves it to user unless user clears cache even if the file is uploaded at that location. Anyone ran into similar issue in the past?

The Law
  • 344
  • 3
  • 20

1 Answers1

-1

By default, most browsers cache images, styles and scripts automatically. The easiest way to bypass this for development environments is to set the caching headers detailed here

Another common way to bypass caching is to set a random query parameter (usually ?v=<random value here>).

Chromium based browsers also have a disable cache option in the dev tools cache clear button

user3674603
  • 56
  • 1
  • 6