gpt4 book ai didi

jquery - 如何在 .htaccess 文件中添加过期 header

转载 作者:行者123 更新时间:2023-11-28 05:56:45 25 4
gpt4 key购买 nike

我在 .htaccess 文件中为过期 header 添加了以下代码。它适用于所有文件,但不适用于 google translate css 和 js 文件。

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/svg "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/plain "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType application/x-javascript "access plus 1 month"
</IfModule>

谁能解释一下这是什么原因。

最佳答案

尝试

ExpiresByType text/x-javascript "访问 1 个月"

关于jquery - 如何在 .htaccess 文件中添加过期 header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37026725/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com