Chrome不断加载我网站的旧缓存 [英] Chrome keeps loading a old cache of my website

查看:93
本文介绍了Chrome不断加载我网站的旧缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了这个奇怪的问题,我的Chrome浏览器不断加载我的网站的旧版本,其代码甚至不再存在于我的服务器上。我认为这是一个典型的缓存问题。



我试图清理浏览器缓存,使用igcognito模式和干净的DNS缓存。旧的缓存页面仍在加载。



这个问题似乎一直在讨论这个谷歌集团三年,但仍然没有解决方案。 https://productforums.google.com/forum/#!topic/chrome / xR-6YAkcASQ



使用firefox或任何其他网页浏览器都能完美运作。

不会发生在我身上。

解决方案


 <$ c $所有同事都会在我的网站上遇到同样的问题。 c><?php Header(Cache-Control:max-age = 3000,must-revalidate); ?> 


您可以实现一个PHP脚本,它必须是第一行代码在您的索引文件中。这是一个通常由Web服务器发布的http头。您也可以重新命名被认为是陈旧的资源。本教程将会给你更多的细节。 https://www.mnot.net/cache_docs/


I am experiencing this weird issue where my Chrome browser keeps loading a old version of my website whose code doesn't even exist on my server any more. I assume it's a typical cache issue.

I tried to clean the browser cache, use igcognito mode, and clean DNS cache. The old cached page is still being loaded.

This issue seems to have been discussing on this google group for three years but there is still no solutions. https://productforums.google.com/forum/#!topic/chrome/xR-6YAkcASQ

Using firefox or any other web browsers works perfectly.

It doesn't just happen to me. All my coworkers experience the same issue on my website.

解决方案

<?php Header("Cache-Control: max-age=3000, must-revalidate"); ?>

You can implement a PHP script that must be the first line of code in your index file . It is an http header typically issued by web servers. You can also rename the resource that is considered "stale". This tutorial will give you more details. https://www.mnot.net/cache_docs/

这篇关于Chrome不断加载我网站的旧缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆