Google’s Tip on Using JavaScript and Implementing Responsive Design!

Google UK’s Pierre Far has posted informative details of JavaScript with responsive design on Google+. This piece of info has been welcomed by webmasters looking for guidance in implementing the responsive web design which Google recommended for building mobile site.

This is what he wrote on using JavaScript:

“Using JavaScript potentially gives a neat solution to two questions we've seen:

  1. How to include ads from networks that do not support responsive web design.
  2. Using images of different sizes/resolutions for different devices.

Following our recommendations detailed above, you can use client-side JavaScript to decide which image or ad network/tag to include in the page while still using the full power of responsive web design.”

He shared a help page about JavaScript and responsive web design:

“Three popular implementations of JavaScript for smartphone-optimized sites are:

  • JavaScript-adaptive: In this configuration, all devices are served the same HTML, CSS, and JavaScript content. When the JavaScript is executed on the device, the rendering or behavior of the site is altered. If a website requires JavaScript, this is Google's recommended configuration.
  • Combined detection: In this implementation, the website uses both JavaScript and server-side detection of device capabilities to serve different content to different devices.
  • Dynamically-served JavaScript: In this configuration, all devices are served the same HTML, but the JavaScript is served from a URL that dynamically serves different JavaScript code depending on the device's user-agent.”

Do you find this info useful? Do share your views.

Navneet Kaushal
About Navneet Kaushal
Nav is the founder and CEO of Page Traffic, a premier search engine company known for its assured SEO service, web design and development, copywriting and full time SEO professionals. Navneet has wide experience in natural search engine optimization, internet marketing and PPC campaigns. He is a prolific writer and his articles can be found in the "Best Articles" section of many websites and article banks. As a search engine analyst , he has over 9 years of experience and his knowledge is in application here.

Leave a Reply