|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Load javascript last?
In my html I am currently calling an external javascript from another site. It runs a small text ad at the top of the page. But the external site does not always load due to server issues, etc. When the javascript is down, it delays the loading time for the entire page a few seconds. Is there a way that I can load this javascript after all other elements have been loaded so that the load time for the page will not be jeopardized? Thanks.
|
|
#2
|
|||
|
|||
|
No way to answer that without seeing the script itself. It likely outputs via document.write(), in which case its placement in the document is critical - it'll stream its HTML wherever the tagpair is embedded. JS files download in series: parsing stops until they arrive, and are processed. Probably a solution somewhere.
|
|
#3
|
|||
|
|||
|
Here's the script. It is run throught a script src call in the middle of the html code:
<!-- <TABLE WIDTH="285" BORDER="0" CELLSPACING="0" CELLPADDING="1"> <TR> <TD WIDTH="275" BGCOLOR="#003c77"> <TABLE WIDTH="275" BORDER="0" CELLSPACING="0" CELLPADDING="4"> <TR> <TD WIDTH="100%" BGCOLOR="#d5eaff"> <P><script src="http://www.textads.biz/getNextAd.jsp?siteref=30a72f1f639dbb792673a10bc96a8a40&adNum=1"></script></TD> </TR> </TABLE><TABLE WIDTH="275" BORDER="0" CELLSPACING="0" CELLPADDING="4"> <TR> <TD WIDTH="100%" BGCOLOR="#d5eaff"> <P ALIGN=RIGHT><FONT SIZE="-2" FACE="Arial">>> <A HREF="http://www.noticetothepublic.com/adinfo.html" CLASS="nav">Buy Your Own Text Ad</A></FONT></TD> </TR> </TABLE></TD> <TD WIDTH="10"></TD> </TR> </TABLE> //--> |
![]() |
| Viewing: Dev Shed Forums > Web Design > JavaScript Development > Load javascript last? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|