0

To whom knows HTTP and HTML headers : I have a project for which I need to avoid the caching of a webpage. I have a basic knowledge of HTML, I found on the web that to avoid the caching I need to put some tags in the HTML code. I put the following tags :

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate, max-age=0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">

which I took on another post. However, I still get my page cached for one hour by the servers and the HTTP header response from the server: Cache-Control: max-age=3600 Anyone have a cue ? How can I get Cache-Control: max-age=0 ? Anything wrong in my code ?

user3829017
  • 11
  • 1
  • 3

1 Answers1

0

As Alohci said in the comments section, the server didn't even look at the meta tags... After I modified the .htaccess file on the Apache server, it worked fine.

The meta tags are overridden by the server's http headers so it is of no help to put them... instead, modify the http headers sent by the server. The method to do this varies according to which server you're using. On apache servers, there is a .htaccess file controlling the caching of the pages.

user3829017
  • 11
  • 1
  • 3