• Post Reply Bookmark Topic Watch Topic
  • New Topic

tell me the meaning of these scripts

 
Sekhar Chand
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai guys,

can any tell me what is the meaning of the below 4 lines

response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("max-age", 0);
response.setDateHeader("Expires", 0);

Please explain in detail every line.
By putting this in my code, my history is not working
How these lines will work

Thanks in advance
ratna
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at this...

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

You are asking the client not to cache pages.
 
Sekhar Chand
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yaa , i got you and what exactly the meaning of the whole code .
The meaning of the combination of the four lines.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the key is that different browsers, from vendor to vendor, and version to version, have used different headers for caching, thus the plethora of them.

-Cameron McKenzie
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!