我有一个网站WeeTech Solution。每当我检查我的“GT矩阵”网站是给我的问题的数量等......(未指定到期日) •https://www.weetechsolution.com/css/content_slider_style.css如何根据GTMatrix解决这个“到期未指定”问题?
如何解决这个问题?
我有一个网站WeeTech Solution。每当我检查我的“GT矩阵”网站是给我的问题的数量等......(未指定到期日) •https://www.weetechsolution.com/css/content_slider_style.css如何根据GTMatrix解决这个“到期未指定”问题?
如何解决这个问题?
您必须将此代码添加到您的htaccess文件中。
<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>
如果HTML & PHP的网站,那么你可以使用下面的代码的.htaccess文件并上传该.htaccess
文件主要根源。
<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>
如果在.net网站,然后哟可以使用下面
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMaxAge="24:00:00" cacheControlMode="UseMaxAge" />
</staticContent>
这给
staticContent
内Web.config
文件 代码是不相关的代码。请在https://webmasters.stackexchange.com/上发布。 – Aslam