: Google Pagespeed not recognizing minify, cache leveraging, etc Recently, my sites score completely dropped in site optimization/speed in the Google Adsense rating system. When using Google PageSpeed
Recently, my sites score completely dropped in site optimization/speed in the Google Adsense rating system. When using Google PageSpeed Insights it tells me quite a few things. One being to leverage browser caching. I went into my .htaccess file and added this bit of code.
## EXPIRES CACHING ##
<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 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 2 days"
</IfModule>
## EXPIRES CACHING ##
After adding this code to my .htaccess file I retested my website and saw that it is now asking me to leverage a bunch of jquery plugins. Which I might add were not there prior to adding the code to the .htaccess.
Google is also asking me to minify my CSS, HTML, and JS. Well, I downloaded a Wordpress plugin called Better Wordpress Minify, which is set to automatically minify HTML, CSS, and JS. After installing the plugin and retesting through Google Pagespeed I noticed that it is still asking me to minify a couple of things. Its asking me to minify the customscript.js in my theme, and wants me to minify the HTML of my homepage.
Google also asked me to compress my website so I downloaded WP HTTP Compression which seemed to compress almost everything except for two files: modernizr.min.js, and customscript.js.
I know this is a lot of information to take in, and I am probably asking for a lot, but any help would be greatly appreciated.
More posts by @Shakeerah822
1 Comments
Sorted by latest first Latest Oldest Best
The Wordpress plugin can't compress your javascript files as these aren't served by Wordpress, your Web server serves these files directly. I'd suggest trying to use mod_deflate for compression instead if your host has it installed. If so you can do this with a small change to your htaccess file (and you could then remove the WP plugin).
The slow initial response time seems to be an issue for your site, you might want to look into Wordpress caching plugins to improve this.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.