Force a page cache of Ajax content

Posted by Webnet on Stack Overflow See other posts from Stack Overflow or by Webnet
Published on 2010-06-01T16:38:06Z Indexed on 2010/06/01 16:43 UTC
Read the original article Hit count: 153

Filed under:
|

I have a page that is an search where the results are loaded via ajax. It then lists products on a page and you can click to view each product. I'd like to change this page where after you view a product if you click "back" on your browser it'll load the cache instead of forcing the user to search again.

How can I achieve this?

I currently have....

header('Cache-Control: private, max-age:3600');
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + 3600));

and it doesn't load the cache

© Stack Overflow or respective owner

Related posts about php

Related posts about cache