OpenX Async Tags

时光怂恿深爱的人放手 提交于 2019-11-30 05:43:47

问题


We all want to make our site faster, google showed a few samples here: http://code.google.com/speed/articles/html5-performance.html

We use OpenX to serve ads, so, assuming browser supporting (FF3.6+), I presume we can just modify the OpenX ad tag from :

<script type='text/javascript'> ... ad codes </script>

into

<script type='text/javascript' async> ... ad codes </script>

Will that do the job? Is there a better way to load scripts asynchronously?


回答1:


Unfortunately OpenX uses document.write to do most of its work. This means that it will attempt to write at whatever point in the flow its currently on when the script actually runs. I've tried changing the OpenX javascript snippet itself to not use document.write, but discovered that the response from OpenX often contains document.writes as well.




回答2:


has anyone tried this with openx tags?

http://jqueryad.web2ajax.fr/



来源:https://stackoverflow.com/questions/3106782/openx-async-tags

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!