html - How to Specify a Vary: Accept-Encoding header? -
google , pingdom.com says should "specify vary: accept-encoding header"
i not know or understand how this. can explain , does?
i getting 100% score in https://tools.pingdom.com/ , https://developers.google.com/speed/pagespeed/insights/
i found helpful post speed wordpress website or blog https://www.keycdn.com/blog/speed-up-wordpress/
with other optimizations, using below code on site in .htaccess
file (usually hidden in main website folder)
my server apache, can check in hosting control panel (like cpanel/whm panel)(if server nginx check keycdn.com post)
(copy , paste below code in .htaccess file, it's working me)
(upvote answer if works you)
<ifmodule mod_expires.c> expiresactive on expiresbytype image/jpg "access 1 month" expiresbytype image/jpeg "access 1 month" expiresbytype image/gif "access 1 month" expiresbytype image/png "access 1 month" expiresbytype image/svg "access 1 month" 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 text/javascript "access 1 month" expiresbytype application/javascript "access 1 month" expiresbytype application/xhtml+xml "access 1 month" expiresbytype application/x-shockwave-flash "access 1 month" expiresbytype image/x-icon "access 1 month" expiresdefault "access 1 month" </ifmodule> <ifmodule mod_headers.c> <filesmatch ".(css|jpg|jpeg|png|gif|swf|svg|js|ico)$"> header set cache-control "max-age=2592000, public" </filesmatch> <filesmatch ".(x?html?|php)$"> header set cache-control "private, must-revalidate" </filesmatch> </ifmodule> <ifmodule mod_deflate.c> # compress html, css, javascript, text, xml , fonts addoutputfilterbytype deflate application/javascript addoutputfilterbytype deflate application/json addoutputfilterbytype deflate application/atom+xml addoutputfilterbytype deflate application/rdf+xml addoutputfilterbytype deflate application/rss+xml addoutputfilterbytype deflate application/vnd.ms-fontobject addoutputfilterbytype deflate application/x-font addoutputfilterbytype deflate application/x-font-opentype addoutputfilterbytype deflate application/x-font-otf addoutputfilterbytype deflate application/x-font-truetype addoutputfilterbytype deflate application/x-font-ttf addoutputfilterbytype deflate application/x-font-woff addoutputfilterbytype deflate application/x-javascript addoutputfilterbytype deflate application/xhtml+xml addoutputfilterbytype deflate application/xml addoutputfilterbytype deflate font/opentype addoutputfilterbytype deflate font/otf addoutputfilterbytype deflate font/truetype addoutputfilterbytype deflate font/ttf addoutputfilterbytype deflate image/svg+xml addoutputfilterbytype deflate image/x-icon addoutputfilterbytype deflate text/css addoutputfilterbytype deflate text/html addoutputfilterbytype deflate text/javascript addoutputfilterbytype deflate text/plain addoutputfilterbytype deflate text/xml </ifmodule>
Comments
Post a Comment