domWrite() lazy loading ads: external code using document.write() - execution AFTER the page has rendered

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Friend of mine wrote this article that might be of interest to you:



Often there is advertizing code to be implemented in a page, and there are 2 problems one may face:

(1) the website hangs due to a lag on the code delivering server
(2) you normally cannot lazy load the script since document.write() is used inside the foreign code which only works during rendering of the page.

This is a snippet that allows the asynchronous loading and delayed execution of JS code that contains document.write() statements in the context of a DIV element:

http://blog.phpbuero.de/?p=26

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux