Defer Parsing JavaScript

10/9/2016 ~ The new thing is AMP, Accelerated Mobile Program. AMP came to my attention at about the same time that I noticed my traffic from Google Search was drastically reduced. I could see that I was having far fewer mobile visitors, even though my site is Mobile Friendly and I pay for really fast hosting now.

Here’s an excellent AMP video that clearly explains where AMP is coming from. Video.

History of Trying to Speed Up Site

The next day ~ Caching is complete. Parsing is now down to a grade of 4. So, I’m uninstalling Speed Booster.

A few days later ~ So far, so good. Caching is complete and all images and Google AdSense ads on Grow-Your-Vitamins continue to show. I don’t know how to remove the compression from my sandbox site, but it doesn’t matter.

I’m afraid to try it on my big site, however. So I’m going to try deferring on another smaller site, as a further test. Turns out this is my “smaller site.”

GT Metrix before using Speed Booster gives me an E score of 56 for Defer Parsing of JavaScript.

After saving Speed Booster changes, my score went down to F at 42. BUT, I had forgotten to deactivate W3. So, I deactivated Speed Booster and deleted it, then deactivated W3, and re-installed Speed Booster. I did the first set of Speed Booster Settings, and low and behold, my overall grade went from 89 to 91. Defer parsing is now orange, at 65 and a D score. Not perfect by any means, but… better.

However, Reactivating W3 caused my score to go down to a 90, and parsing to sink back down to an E, but at the lower numeric grade of 50.

Tomorrow when caching is complete, I’ll test it again.

One day later ~ ARGGGGHHHH ~~~ “Inline small javascript files” by FeedtheBot, didn’t work. Once caching was complete at every level, Google Adsense ads no longer showed. So, that’s not ideal, at all.

I’ve re-read the pages on deferring. I’ve added “defer” as per instructions, and several other “fixes”. None worked.

Speed Booster Pack

I’m now going to try a WordPress plugin, Speed Booster Pack, that has a convincing video. Its background music is too forceful for me, so I’ve muted and am about to follow the visual instructions step by step.

Speed Booster 1 Crop Asterisk1. GTMetrix Report

2. Deactivated W3 Total Cache

3. Installed Speed Booster Pack

4. Activated Speed Booster Pack

5. Speed Booster Settings – All options appear automatically checked; in video only half are automatically checked

6. Go to: Still Need More Speed Setting ~ Choose first three options

Load CSS Asynchronously

Minify all CSS styles

Insert all CSS styles inline to the footer

7. Save Changes

Speed Booster 2 Scale 310 width Asterisk8. Test ~ Score isn’t much different, but Parsing is down to yellow from red

9. Change Image Compression

Okay… this scares me, because is I change the compression and the images become blurry, I won’t want them permanently on my site…

So, I’ve gone to the ipage Control Panel and created a Sandbox to test going forward. I think all hosting has the Sandbox option.

10. I just looked at my sandbox site after compressing per the video. My site is seriously weirded out.

 1st and Worst Infraction

“Defer parsing of JavaScript” is no longer my first and worst infraction with a red line trailing behind it. It’s down to 4th, it’s got a green line and I got an A from PageSpeed, using GTMetrix which is what the Pros at W3 Total Cache use to analyze website performance.

GT Metrix ~ Try it now.

Days 1 and 2 ~ I’ve been struggling for years with low grades because my JavaScript was not having its parsing deferred. Sadly, that was Geek to me, some might say, “Greek to me”. And, with predictable consistency, when I asked on forums and asked for help, the responses were better appreciated by tech types, than me.

What was clear, however, was that it was related to my Google AdSense ads. Each of the top three instances of failing to defer parsing was a Google AdSense ad. My AdSense ads were slowing my pages, and Google was dinging my site for being slow, which most likely meant my pages were coming up lower in Google Search results.

Yesterday I decided that even though I had already tried everything I could think of and asked for help repeatedly in all different ways, in all different places, I would try again.

Maybe if I just understood the terms better, I could make the needed changes. So, I Googled, “what is a small js file”

Script codeTo my surprise the page I went to, “Inline small javascript files” by FeedtheBot, had hardly anything written on it and an orange box proposing a solution that looked far too simple to help with such a difficult problem. Visit page.

While I didn’t believe anything that simple could help, I tried it on my least visited site.

At first my Google AdSense ads disappeared, which wasn’t a surprise since I didn’t believe this was really going to work.

But, then I thought that possibly I’d try placing the code into the ad code differently.

Leave a Reply

  

  

  

Privacy Policy