Force a page cache of Ajax content
- by Webnet
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