The only two types of scripts I know of that still need to go in the head are:
- framebreaker scripts and similar where the script is deciding whether to continue loading the page or to start a new page load
The one type of script I know of that still needs to wait for the load event to trigger before it can run is where the script is going to substitute different images for any externally linked images that fail to load.
Question One: Can anyone think of any other types of script that need to go in the head rather than just before the </body> or which need to wait for the load event to trigger before they run?
I know that any script can go in the head with an appropriate delay applied - but which onces must go there? I also know that all scripts placed at the bottom can apply a delay but which ones will actually fail to work at all if you don’t apply a delay?
Are there any ad services that display ads like Google AdSense that do not use antiquated document.write statements and so can be placed with the rest of the scripts without needing to use postscribe?
I know that there are lots of other types of scripts that might still use document.write but you can always find an alternative to those that doesn’t use that call or alternatively rewrite the script to get rid of that call - something that you cannot do with ad scripts so that using postscribe to dynamically change how document.write works is the only alternative to actually jumbling the scripts through the page.