4

Here's what I need to get, the version of the page must be the last. It's a price list, no way i want the price from last week.

So I got some code from everywhere on the web and paste it to my header, here it is:

<meta http-equiv="Pragma" content="no-cache"> 
<meta http-equiv="expires" content="0"> 

I dont know if it's enough or what it does, but it must tell the browser:

  1. Download the page
  2. Forget the cache, it's too old even if you hit reload 10 times in a row. Download it again.

So the question: is it the proper way? It's a HTML only page, no jQuery nor PHP.

1
  • aside the point, cheap isn't the reason to cache Commented May 23, 2013 at 1:50

1 Answer 1

1

Those meta tags have an http-equiv attribute because they're a document-level placeholder for items that should be in the HTTP response. Instead of sending requests for your bare resource, clients should be sending a "GET if not modified since X" request, and they should be set correctly in your header. Ask your host for reference on how to provide those "no cache" options.

See this exact duplicate of your question for more information, btw.

Also, a knowledge-utility basis, add a "Prices good until XXXX" in the content of your page. It's a price list, so someone will print it out and think that it's still a good price if you don't have an indicator otherwise.

Sign up to request clarification or add additional context in comments.

1 Comment

Sometime you cannot modify server setting... can't go there !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.