I'm running a dynamic MySQL/PHP website. To prevent some ISPs from ignoring the Meta/Pragma fields in the HEAD section of the webpages I have added the following lines just before the document is generated.
This has been working really well and my users are no longer getting confused when they recieve out of date/ other users pages.
The problem is that it seems to also affect the images on the webpages, and some are quite graphic heavy (often with re-occuring icons.) This is hard to test because I am on broadband, but once a page is loaded the images load one by one - which suggests that the browser is getting the images off the web server rather than the local drive.
So - my question is - is it possible to define the No-cache to only apply to the text/content of the word pages and not the images?
Any comments, suggestions etc. greatly appreciated.
Cheers
Tama
Code:
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Pragma: no-cache"); // HTTP/1.0
This has been working really well and my users are no longer getting confused when they recieve out of date/ other users pages.
The problem is that it seems to also affect the images on the webpages, and some are quite graphic heavy (often with re-occuring icons.) This is hard to test because I am on broadband, but once a page is loaded the images load one by one - which suggests that the browser is getting the images off the web server rather than the local drive.
So - my question is - is it possible to define the No-cache to only apply to the text/content of the word pages and not the images?
Any comments, suggestions etc. greatly appreciated.
Cheers
Tama