Hello tagDiv!
I was trying to increase my Pagespeed and got 85 (desktop), 77 (mobile). It is saying that I should “Eliminate Render-Blocking JavaScript and CSS” Will the theme work good, if I minify JS? Please let me know what can I do. BTW I’m using W3TC.
Thanks Mehedi
I have minified my site.js and had no problems. Minifying plugin javascripts won’t do much for you, just a heads up on that.
-
This reply was modified 12 years by
enemyborat.
I think my links to recommended minify resources are in the sticky topic on pagespeed, but I generally use one of these:
for CSS (used this yesterday): http://cssminifier.com/
for JS/CSS (sometimes site is down) – used this on newspaper 2x for one of my two test sites (‘ga-ga’ site methinks):
http://refresh-sf.com/yui/
JavaScript Options = Minify only, no symbol obfuscation.
I’ve also used this once or twice, but one of my web browsers didn’t like it
http://www.csscompressor.com/
I can’t use W3TC on my host, what do you think about this plugin for WordPress http://wordpress.org/plugins/bwp-minify/
@christopher Do I need to copy all the codes from style.css and minify it from the website and then replace the codes?
please let me know
thanks1
@mehedi
yes, I use BBedit on Mac and TextPad on PC, as my text editors, but basically you can also use notepad (not wordpad), or whatever the plain text editor on Mac is these days (I always want to say simpletext).
SO: create new blank text document with same name as the file you plan to minify (filenameXYZ.js), put into a folder or wherever you store stuff on your computer, and leave it open …
THEN, open the file from Newspaper theme folder you want to minify in text editor, select all (CTRL+A) and copy and paste into the minifier site, apply – then copy the minified text into your blank document then save. FTP up the minified version to over-write the original in the theme folder (you should have backup, or your themeforest install as backup obviously).
So, you’re replacing the original *.js file in the theme folder with your minified version.
Easy. Certainly there are plugins that might work for you, too, but I’ve not used one lately so can’t suggest best one beyond the discussion in the pagespeed topic.
Reload your page. If you’re caching the js files obviously you need to clear cache. Both on site if using cache plugin and in your web browser to see changes.
Remember you would need to do this each time you update the theme. But it really takes under a minute to do, for those who need it done. Try it.
====== OTHER OPTION =========
if you’re using my pals in Canada at Gossamer Threads, aka “GTMetrix” — a great tip many people entirely miss is that you can run a page score on your site, and it will tell you if CSS or JS need to be optimized BUT THEN IT WILL GIVE YOU LINK TO DOWNLOAD OPTIMIZED VERSIONS!!
Go here: http://gtmetrix.com/
put in your site URL, or a “post” URL – then under stuff to fix it will have section on JS optimization, open little sub box, and it will show you files which “should be optimized” and will have little text link next to each one. Download/save the optimized version, upload via FTP, and done.
-
This reply was modified 12 years by
simchris.
@christopher I’ve minified the style.css but that doesn’t improve the speed…what can I now?
@maqabyah
in looking at that plugin (bwp-minify), it seems there are some minor gremlins as recently as 2 days ago. (Always look at the support topic for each plugin to see current “issues”).
You might “try” using it and see if it works for you or breaks things. You can always turn it off — seems it “should’ work for most people.
I’d likely avoid “WP Minify” which hasn’t been updated since 2012 and lots of bug reports.
