Click to See Complete Forum and Search --> : preload images without JS??
akadis
04-20-2004, 11:16 AM
ok i have a question that might be regarded as dumb, but please dont flame me.
is there a way to preload images without JS :confused: i mean many (ok some) people have browsers that dont support Java Script, so making one in JS makes no sense, if anyone knows of a way or even has an example that would be GREAT !
~thanks ahead of time
buntine
04-20-2004, 12:15 PM
Im quite sure that its not possible. JavaScript's Image class is the most widely supported method, if not the only method.
Less then one percent of users have browsers which dont support JS. However, about 13% of web surfers have JS disabled for security reasons.
Image preloadinf is not all that important anyway. These days, modern modems can handle large amounts of data without much trouble.
Regards,
Andrew Buntine.
mdoigny
04-24-2004, 09:42 AM
There is one alternative to JS:
Put the images in the main index page (or the main frame), with a size of 1 * 1
It works well if the page in question remains on screen long enough to load the image completely (ideal for a frame). When the image is actually needed, the browser will read it's cache instead of downloading the picture again.
Some time ago, i had to make a page containing 8 jpegs (800 * 600), that had to be available nearly instantly (display the image as a result of a mouse over) on one of the sub-pages. There was a frame layout available, and i put the preload images in the menu frame. Worked very good.
ShrineDesigns
05-02-2004, 04:32 PM
you can preload images using css:<style type="text/css">
<!--
.preload {
display: none;
/* for compatibility with older browsers un-comment the following */
/*
position: absolute;
top: -100px;
left: -100px;
*/
height: 1px;
width: 1px;
}
-->
</style>