hwg-graphics archives | Jan 1999 | new search | results | previous | next |
Re: second time - re: preloading imgsby "Ramon Bartschat" <bartschat(at)goldnet.sk> |
|
>Hi > >I asked this a few days ago but I didnt get any response. I have been >following the thread about pre-loading graphics and my question is: How >reliable is using img src width=1 height =1 (ie for an image that is >actually bigger) to preload images? Is there a browser/os/system >combination that will not follow the prescribed img sizes and render the >img in its true size? > >thanks, >phil. Phil I you want to preload images so that the next page in your site will �load faster� then you can use JavaScript. I used below script very successfully. Just put it inside the <HEAD> </HEAD> tag. It really works. Of course replace "yourgraphic.gif" with your graphic filename (with the quotes). <SCRIPT LANGUAGE="JavaScript1.1"> <!-- img1=new Image(); img1.src="yourgraphic1.gif"; img2=new Image(); img2.src="yourgraphic2.gif"; // --> </SCRIPT> The images are loaded into the browsers buffer and displayed 'immediately' when needed. About the 1x1 size. I heard that some odd browsers don't support that and will always display the graphics in full size. But I don't know which browsers under which OS. As a matter of fact I don't even know if this is true. I just read it somewhere. Should you know of a system that ignores Height and Width attributes please let me know. Sincerely Ramon Bartschat
HWG: hwg-graphics mailing list archives, maintained by Webmasters @ IWA