我有一個網站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