Search code examples
javascriptjquerygoogle-search

Google "web light" feature


Google came up with a new feature called Google Web Light. This optimizes websites that are not mobile friendly and are heavy for users with slow connections. Sometimes even YouTube gets optimized.

They URL is like this "http://googleweblight.com/?lite_url= website url".

So, this causes some issues to websites. Mostly JavaScript issues. Take a look at these jQuery UI elements. Nothing seems to work.

Sure there is a link to view the proper website but users won't bother clicking and would leave thinking the website is broken.

How would you go around this. Is there anyway to detect if the users browser is showing the optimized website?

Here is an example of what it looks like: Google web light


Solution

  • This explains how to opt out of WebLite:

    If you do not want your pages to be transcoded, set the HTTP header "Cache-Control: no-transform" in your page response. If Googlebot sees this header, your page will not be transcoded.

    To detect WebLite instead use $(document).ready() in a script to detect if one of those new WebLite elements exists in the loaded DOM:

    if (document.getElementById('lite-menu') != "null")  {
      alert("WebLite is being used") ;
    } 
    

    If you have a fully responsite site then WebLite will only be used for slow connections