Recording embedded documents that can't be recognized by the HTML parser
Preloading an image using scripts
If caching is enabled, embedded documents may be downloaded in advance. In this case, only two request will be sent to the server. Therefore, we needn't/can't record those additional request for download in the script block.
pic1 = new Image();
pic1.src = "../box1.gif";
pic2 = new Image();
<img src= "box2.gif">
Simple download using scripts
The downloads of 'box3.gif' and 'box4.gif' have to be recorded with WebPageAddUrl(...). The 'img' tags will be managed by the HTML parser.
pic3 = new Image()
pic3.src = "box3.gif"
pic4 = new Image()
pic4.src = "box4.gif"
<img src="../images/dept_pic.gif" alt="dept_pic.gif">