Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Response.Expires to PHP ?

Status
Not open for further replies.

donishere

Programmer
May 7, 2002
101
What is the PHP equivalent to ASP's "Response.Expires = -1" in regards to caching? I want a PHP file to never be cached.

Trying to force a sample AJAX file to update its response on each keypress in a form field.

thanks
 
you use the http headers to control the browser's behaviour. you can use php to set the http headers using the header() command.

the php manual recommends this
Code:
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top