【问题标题】:Strange caching issue奇怪的缓存问题
【发布时间】:2016-01-05 18:35:49
【问题描述】:

如果您查看以下文件的内容:

http://swiftdigital.ltd.uk/wp-content/themes/bigbangwp_child/style.css?ver=4.4

如果您查看相同的文件但最后是4.5,内容会有所不同:

http://swiftdigital.ltd.uk/wp-content/themes/bigbangwp_child/style.css?ver=4.5

服务器上的文件内容为:

/*
Theme Name:     BigBangWP Child Theme
Description:    Edit style.css, function.php or copy theme original files and customize it on your own
Author:         Brankic1979
Template:       bigbangwp
*/
@import "css/colors/color-blue.css";

服务器上没有缓存,为什么 4.4 版本返回文件的旧内容?

【问题讨论】:

  • 您的浏览器会缓存它吗?值得一提的是,如果我 curl 两个 URL,我会得到完全相同的内容。

标签: php html google-chrome


【解决方案1】:

您的网站 (www.swiftdigital.ltd.uk) 使用 Cloudflare。默认情况下,Cloudflare 将缓存 JS 文件,这似乎就是这里发生的事情。

清除 Cloudflare 上的缓存将解决此问题。

https://support.cloudflare.com/hc/en-us/articles/200169246-How-do-I-purge-my-cache-

【讨论】:

  • 当然,我总是忘记这一点!谢谢!
猜你喜欢
  • 2021-04-04
  • 1970-01-01
  • 2013-01-11
  • 2016-08-17
  • 2019-01-07
  • 1970-01-01
  • 1970-01-01
  • 2011-10-30
  • 1970-01-01
相关资源
最近更新 更多