[Suggestion] Preloading images and Loading time
Posted: 27 Sep 2006, 18:44
Hello Hans and Treemenu users, first of all i find treemenu as an excellent option for any kind of application, but sometimes on IE 5.0 or 6.0 i find the loading time of the tree are really long on large trees, especially, after you clean the cache or when you disable the cache of you browser, so far the only way that i found to solve this is usign "preloading" i try to solve this problem adding a small preloading script (on javascript)before the call of the treemenu:
<script >
pic1= new Image(16,14);
pic1.src="../images/open.gif";
pic2= new Image(16,14);
pic2.src="../images/close.gif";
pic3= new Image(16,20);
pic3.src="../images/tieminus.gif";
pic4= new Image(16,20);
pic4.src="../images/tieplus.gif";
pic5= new Image(16,20);
pic5.src="../images/passline.gif";
pic6= new Image(16,20);
pic6.src="../images/tieline.gif";
pic7= new Image(16,20);
pic7.src="../images/endline.gif";
pic8= new Image(16,14);
pic8.src="../images/item.gif";
pic9= new Image(16,20);
pic9.src="../images/endplus.gif";
pic10= new Image(16,20);
pic10.src="../images/endminus.gif";
</script>
i find that the loading time for the treemenu (even when IE cache is empty) is decreased pretty much.
i hope that if you ever plan to release another version or patch or something you could check for this option.
<script >
pic1= new Image(16,14);
pic1.src="../images/open.gif";
pic2= new Image(16,14);
pic2.src="../images/close.gif";
pic3= new Image(16,20);
pic3.src="../images/tieminus.gif";
pic4= new Image(16,20);
pic4.src="../images/tieplus.gif";
pic5= new Image(16,20);
pic5.src="../images/passline.gif";
pic6= new Image(16,20);
pic6.src="../images/tieline.gif";
pic7= new Image(16,20);
pic7.src="../images/endline.gif";
pic8= new Image(16,14);
pic8.src="../images/item.gif";
pic9= new Image(16,20);
pic9.src="../images/endplus.gif";
pic10= new Image(16,20);
pic10.src="../images/endminus.gif";
</script>
i find that the loading time for the treemenu (even when IE cache is empty) is decreased pretty much.
i hope that if you ever plan to release another version or patch or something you could check for this option.