Mod_PageSpeed & Google Mobile-Friendly Test

120 views
Skip to first unread message

Aparna

unread,
Feb 6, 2017, 3:56:33 AM2/6/17
to mod-pagespeed-discuss
Hi,

Our website's "Mobile friendly tests" have been failing for the past couple of days(Since 4 Feb 2017). Prior to failing, NO changes were made to the server. All our Android and iOS devices are still showing the website FINE though (Compatible, renders well).




Since they failed consistently, I closely inspected and found that a new file “http://mommyfood.com/pagespeed_static/js_defer.tRzI7EHUpg.js” is showing up in the “Should Fix” suggestions of PageSpeed Insights. This file never showed up in the earlier tests. PageSpeed score has reduced by 5 odd points because of this new file.





After some experimentation, I found that by turning off “defer_javascript”, the mobile friendly tests would PASS. This was not the case earlier as the website would pass every time even with defer_javascript ON.





The problem with turning off “defer_javascript” is that the load times are significantly high, also to be noted that that the PageSpeed Insights score has dropped too. As expected, nothing shows up until all the javascript is loaded and the site seems really slow without “defer_javascript”. The site renders fine with OR without “defer_javascript” on all our  Android and iOS devices





Now,


A) If I leave it as it is with defer_javascript ON, I suppose google will crawl it as Mobile Incompatible. I tested it with Webmaster Tools, here's the screenshot:





B) If I turn OFF defer_javascript for the sake of Googlebot, the entire user experience would get hit.



Of the other things I tried, I switched to the latest mod_pagespeed BETA to see if it can be resolved. No good, the file “http://mommyfood.com/pagespeed_static/js_defer.RANDOMNAME.js” still shows up in the PageSpeed Insights results.



Switched to the STABLE version again. Restored the server too to a date prior to this error.



Links for testing:


1) Mobile-Friendly Test: https://goo.gl/dwBFfO


2) PageSpeed Insights Test: https://goo.gl/8h3nNw



A PDF of the entire post is attached for convenient viewing. Suggestions are welcome. Thanks in advance.



Regards,

Aparna

PageSpeed Mobile Compatibility Issue.pdf

Joshua Marantz

unread,
Feb 6, 2017, 8:22:28 AM2/6/17
to mod-pagespeed-discuss
Thanks for the report.  I have to be honest that although it offers some impressive speed gains, we've not put a lot of energy into defer_javascript because it's just too hard to get it to work well on all sites.

I will admit, though, that it should be straightforward for mod_pagespeed to inline the js_defer helper script.  This is already captured in https://github.com/pagespeed/mod_pagespeed/issues/997

-Josh

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/f3eb4263-d743-43bd-bc55-83b5d6164a54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Otto van der Schaaf

unread,
Feb 6, 2017, 8:23:36 AM2/6/17
to mod-pagespeed-discuss
Hi, 

If you would ask me, I would probably opt for the best user-experience, which by the sounds of it means deferring javascript for now.

I am afraid you have to either refactor how mobile-friendliness is implemented, or choose between one of the options below. Both of which will result in complaints from PSI:
 
- If you do not defer execution of javascript, you will have render blocking javascript, but the upside is that the page will be mobile friendly right away when it (eventually) renders.
- If you defer javascript  execution, first the non-mobile friendly page will be rendered, which will be transformed to mobile friendly by executing the deferred scripts.

Execution of deferred scripts is performed by mod_pagespeed's defer_js.. script. 
My guess is that the blame of being render blocking is transferred from the original scripts to it when it performs deferred execution of the page's scripts.

Otto


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

Aparna

unread,
Feb 6, 2017, 11:10:48 AM2/6/17
to mod-pagespeed-discuss
Hi,

Josh, Otto, I thank you for your valuable inputs and the quick response.

As you suggested, I will opt for the "User-Experience" and keep defer_javascript ON, at-least for now.

A week ago I reported the same problem at "Webmaster Central Help Forum". Since the tests were back to normal (passing as "Mobile Friendly") in a day, I thought the issue was temporary. The discussion is here:


Now that the tests are consistently failing, I suppose "Google's Mobile-Friendly Test" evaluation process must have changed. I wonder why a perfectly mobile compatible website would fail the test (The site still renders good on all my devices).

The screenshot of the failed test resembles the page loading during the initial phase (prior to the "Right Column" adjusting to the bottom of the page if the screen width is less). It could be that "Mobile-Friendly Test" is not loading the entire page or it is blocking some scripts on the page causing a false final render.

A good percentage of the website's traffic is from organic search and 90% of it is from mobiles. Googlebot seeing it as "Not Mobile-Friendly" is definitely not good. Is there a way we can tell them about it ?

Thanks for your time.

Regards,
Aparna
Reply all
Reply to author
Forward
0 new messages