开发者

Google admanager and Jquery

I have Google admanager and Jquery and Jquery UI. But it ta开发者_运维问答kes a long time to load the Jquery because Google Admanager. I have about 30 banners in Google Admanager. Anybody know how to get the Jquery load first? Thanks


I don't really undestand the question, but if google ad manager (like jquery) is an included javascript file, then you should be able to get jquery to load first just by placing the jquery include statement before the admanager statement.

Its also worth looking at setting your Expires header for static javascript files like Jquery and Jqueryui - this way the browser will request them only once. Noting the expiration date in the cache, and will never query the files again until the time has expired.


Jquery loads quickly. However, if you have stuff that's triggered with javascript's onload (many jquery calls are done that way), all the Google Ad Manager calls must finish first -- including the loading of all the slow ads. There are two things you need to fix the problem. First, put all the ads at the bottom of your page. Second, use jquery to place them. See this thread on the Ad Manager forums. Also, you can make any jquery calls immediately after the code they affect. We're currently doing this on whotheman.com. See the source to our page for details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜