Chủ Nhật, 14 tháng 7, 2013

Using Asynchronous AdSense Ads with Responsive Design

JavaScript affects the loading time of your web pages. That’s because when you include any JavaScript code in your HTML web page synchronously, the browser will download and execute the script first before it can render the other HTML tags that come after the script.
Steve Souders, web performance engineer at Google, says that JavaScript loaded synchronously is the “weakest link” and, in some cases, JavaScript can even block your web pages from rendering.

Asynchronous AdSense Ad Tags

Services like Google Analytics, Google DFP, Twitter and Facebook have therefore switched to asynchronous JavaScript for serving advertisements andwidgets. This is a more efficient method as the scripts load in parallel and do not block the web page from rendering.
Also, if the web server hosting the JavaScript file has become slow or offline, the other HTML elements of your web page would still render just fine in the browser.
Async AdSense Ads
Google too offers publishers the option of using non-blocking asynchronous ad tags for serving AdSense ads on their websites. If you wish to offer a better experience to your visitors, and also improve your site’s page speed, it may be a good idea to migrate your old AdSense ad code to the new asynchronous JavaScript tags.

Không có nhận xét nào:

Đăng nhận xét