当前位置: 动力学知识库 > 问答 > 编程问答 >

php - HTML still caching even after meta tag no caching implementation on Godaddy

问题描述:

I am building the following site: princeton staffing solutions.

In it, I use the following HTML meta tags

<meta http-equiv="cache-control" content="max-age=0" />

<meta http-equiv="cache-control" content="no-cache" />

<meta http-equiv="expires" content="0" />

<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />

<meta http-equiv="pragma" content="no-cache" />

Unfortunately, it's still acting as before I added these tags. I make database updates and I need to hard refresh the site to see the changes. Is there something I'm doing incorrectly?

I also do this in my PHP before i run the application code:

header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");

header("Cache-Control: post-check=0, pre-check=0", false);

header("Pragma: no-cache");

I don't know why but I can't get it to send fresh data

Do you think it's possible that this issue has to do with Godaddy's Servers? I mean I'm clearly using the meta tags and header calls correctly so my only indication is that its something internal with Godaddy?

I also have removed gzip as Content-Encoding. (<meta http-equiv="Content-Encoding" content="gzip" >)

网友答案:

3 possible ways :

  1. your browser is caching : remove cache , or even can change browser further can remove internet temporary files.

  2. Your ISP is caching : run your website on http://anonymouse.org/. If it's working there it's your ISP. Contact them.

  3. godaddy's server caching : You can ask for support.

分享给朋友:
您可能感兴趣的文章:
随机阅读: