amitshah Posted September 18, 2009 Share Posted September 18, 2009 Hello, I have created one ecommerce site which have many images on the different webpages. I would like to cache them. For that i have used below code to cache content. $expires = 60*60*24*2; header("Pragma: public"); header("Cache-Control: must-revalidate"); header("Cache-Control: maxage=".$expires); header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT'); My webpage also content session and cookie and it shows number of product purchase on the page header. Using above code it also cache session and cookie and complete HTML page so number of product display wrong(old) on previously visited page. Can any one assist me, how to cache only image content and not complete HTML with cookies? Regards, Amit Shah Link to comment https://forums.phpfreaks.com/topic/174665-cache-only-image/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.