Load the script in an iframe and it should be cached. It may also work if you try to add it as the source of the img tag. After the rest of your components are loaded, you can add a script tag with a large script so that it loads onto the page. I am not sure if this will fix your problems. Do you really want to “preload” or just wait for your page to complete and then load a large JS script?
If you want to use the latter, then you must wait until the load or document ready event occurs to load the script.
Tip. You can also put the script in a separate (optional) domain. This allows some browsers to load more resources at the same time, so it does not block the download of the rest of the site, although by default many new browsers do this.
Cristian Sanchez Aug 27 '10 at 9:17 a.m. 2010-08-27 21:17
source share