Optimizing DFP loading
|
09-11-2010, 12:18 AM
Post: #1
|
|||
|
|||
Optimizing DFP loading
Ive been using DFP (formerly known as Google Ad Manager) to serve ads on my site. I use their Iframe method, where the javascript would write an iframe and allow the third party ad networks to load their ad asyncronously.
But there was still a downside to this. DFP asks me to put the following code within the <head></head> part of the page :- Code: <!-- PUT THIS TAG IN THE head SECTION --> And the following code to load the ads Code: <script type="text/javascript">GA_googleFillSlotWithSize("ca-pub-xxxxxxxxxxxxxxxxxxxxxxx", "slot_name", 728, 90);</script> The problem with this is that this makes 3 serial requests to google blocking up the page. What i did was i moved that chunk to the <body> part of the HTML just before the first time i use the GA_googleFillSlotWithSize() function. The results were astonishing! My final aim is to rewrite the remplate so the adtags(and the bootstrap code) will be below the content, so that shows up instantly. If you see the before and after waterfall charts youll see after the change, atleast some images were being downloaded in parallel to these DFP javascript scripts. Even visually , the user got some feedback that the page is loading earlier. So, next time if some third party asks you to put code within the <head> part, think carefully if it really must go in the <head>? In an ideal world, Google would make DFP tagging absolutely asyncronous so it doesnt get in the way of the user and the content. cdnplanet.com: We help you select the right CDN |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)