开发者

Chrome cache won't update in my site

开发者 https://www.devze.com 2022-12-22 19:02 出处:网络
Chrome ca开发者_StackOverflow中文版che doesn\'t seem to update while accessing my website. Only when people clear it or press ctrl+F5 they can see the new content.

Chrome ca开发者_StackOverflow中文版che doesn't seem to update while accessing my website.

Only when people clear it or press ctrl+F5 they can see the new content.

I'm running it on a Wordpress CMS.

Does anyone have any idea why is this happening?


I encountered a situation with Chrome where a page had no cache-control or expiration the first time Chrome loaded it (which was many months ago as I write this) and even though meta tags were later added to the page explicitly setting the expiration policy, Chrome never honored them.

What had to be done to force a reload was to supply a dummy query-string argument -- just once, merely to get the page to reload with its newly added meta tags-- and thenceforward Chrome began to honor the expiration settings in the meta tags.

BTW, I could not reproduce the problem with documents without meta tags that I created this week; the problem only affected documents that had been first loaded by Chrome many months ago. Perhaps the way Chrome caches documents lacking an expiration policy had changed in the interim, so that only documents loaded before the change were being cached in perpetuity.

P.S. I know that this question was asked months ago and the OP may have solved his problem by now -- but you never know when someone's going to come along a few months from now looking for help on the same problem. So the "dead question police" can stand down.


(I know it's been ages, but I found this since I had a related problem, but didn't find my solution here:)

I had the same, but even after heavy refreshing and clearing page cache it didn't work. I have no idea why. (I had no desire to clear my entire cache, so I didn't try that)

My image was a set of arrows in a Nivo-slider element, that were created after pageload. Every browser except firefox kept displaying the old image. When I would navigate to the URL of the arrows image, however, they would be the new image.

I solved it by putting a <img src="[image]" width=0 alt=""> somewhere in my page where it didn't break the layout (bottom is good). Then when I refreshed, the arrows in the slider finally changed into the new ones.

Hope this reaches anyone with similar weird cache behavior.

0

精彩评论

暂无评论...
验证码 换一张
取 消