thinkphp5 引入css和js 缓存问题
css修改后不起作用1删除浏览器缓存2删除框架缓存3设置apache过期时间.htaccess(<IfModulemod_expires.c>ExpiresActiveO...
css 修改后不起作用
1删除浏览器缓存
2 删除框架缓存
3 设置apache 过期时间 .htaccess
(
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 2 seconds"
ExpiresByType image/jpg "access plus 2 seconds"
ExpiresByType image/jpeg "access plus 2 seconds"
ExpiresByType image/x-icon "access plus 2 seconds"
ExpiresByType image/bmp "access plus 2 seconds"
ExpiresByType image/png "access plus 2 seconds"
ExpiresByType text/html "access plus 2 seconds"
ExpiresByType text/css "access plus 2 seconds"
ExpiresByType text/txt "access plus 2 seconds"
ExpiresByType text/js "access plus 2 seconds"
ExpiresByType application/x-javascript "access plus 2 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2 seconds"
</IfModule>
)
4 php think clear
5 在引入样式后面加版本号
但是上面都不管用
只能换文件名重新引入,有解决的方法吗 展开
1删除浏览器缓存
2 删除框架缓存
3 设置apache 过期时间 .htaccess
(
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 2 seconds"
ExpiresByType image/jpg "access plus 2 seconds"
ExpiresByType image/jpeg "access plus 2 seconds"
ExpiresByType image/x-icon "access plus 2 seconds"
ExpiresByType image/bmp "access plus 2 seconds"
ExpiresByType image/png "access plus 2 seconds"
ExpiresByType text/html "access plus 2 seconds"
ExpiresByType text/css "access plus 2 seconds"
ExpiresByType text/txt "access plus 2 seconds"
ExpiresByType text/js "access plus 2 seconds"
ExpiresByType application/x-javascript "access plus 2 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2 seconds"
</IfModule>
)
4 php think clear
5 在引入样式后面加版本号
但是上面都不管用
只能换文件名重新引入,有解决的方法吗 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询