Adding the watermark to the & lt; meta & gt; header will not allow the browser to cache images. why?
The website uses thinkphp development, isapi_rewrite3 redirection URL, IIS6 server
However
1. IIS startup content expired
2. set header () in php ()
3.html Header
The browser cannot cache images. why?
How can we achieve this? even if the browser F5 refreshes, the image cache will not be cleared?
Such as this web site http://nanning.xjwy.cn/bao/img_show.php? Imgurl = http://nanning.xjwy.cn/upload_files/qb_bao_/1/87829_20130516110511_7bwar.jpg&baoban=
Only the image is loaded once, and the image is not cleared after refresh. Share To: header... 'data-pics = ''>
------ Solution --------------------
The page returned by the http://nanning.xjwy.cn/bao/img_show.php has
Of course, this image will be cached.
------ Solution --------------------
Add cache commands to img_show.php, for example:
Header ('cache-Control: max-age = 100'); // The number is the number of seconds you want to Cache
Echo file_get_contents ($ imgurl );
?>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service