如何防止需要POST数据的特定页面的浏览器缓存?

时间:2015-12-26 09:58:57

标签: php apache .htaccess mod-rewrite caching

我是浏览器缓存的新手。我的.htaccess文件中有以下代码:

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##

我的网页很少,需要显示POST数据。我不希望为这些页面缓存text / html响应。它可以缓存图像,CSS和JavaScript。我如何通过.htaccess实现这一目标?

0 个答案:

没有答案