The apache prompts that the max-age or expires solution is not set. max-ageexpires
You should know that you only need to Set max-age or expires. The following method is used to set apache:
Generate to enable
The Code is as follows:
LoadModule headers_module modules/mod_headers.so
Then write it under the. htaccess File
The Code is as follows:
<IfModule mod_headers.c>
<FilesMatch "\. (ico | pdf | flv | jpg | jpeg | png | gif | js | css | swf) $">
Header set Cache-Control "max-age = 604800, public"
</FilesMatch>
<FilesMatch (www.111cn.net) "\. (xml | txt) $">
Header set Cache-Control "max-age = 18000, public, must-revalidate"
</FilesMatch>
<FilesMatch "\. (html | htm | php | shtml) $">
Header set Cache-Control "max-age = 3600, must-revalidate"
</FilesMatch>
</IfModule>
If the "mod_headers" module is not enabled and the "<IfModule mod_headers.c>" condition is not added, an error will occur on the website!
Setting max-age or expires is used to cache static files, improving the loading speed of websites.
From: http://www.111cn.net/sys/Windows/68259.htm
How can I set up Baidu's optimization suggestions (max-age or expires not set) when I buy a website using hichina?
This is a pseudo-static setting. Your ASP Website can produce static HTML without the need to ignore that prompt. Static data is more advantageous than pseudo static data.
How does IIS set global cache-control webpage cache or expires expiration time?
For example, if there is a similar configuration in IIS like the code of apache mod_expires header set cache-control "max-age = 3600", the configuration file is httpd because it is a virtual host. ini