preload images?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blobb
    New Member
    • Apr 2007
    • 12

    preload images?

    hi all,

    i have 50 hidden div layers with images insided, each is appr. 200kb big.

    i use this script to show/hide them, when neccesary:

    Code:
    function init() {
    IE = (document.all)
    NC = (document.layers)
    Opera = (document.getElementById)
    }
    
    
     function hide(id) {
    init();
    if(IE) eval('document.all[id].style.visibility = "hidden"')
    if(NC) eval('document.layers[id].visibility = "hidden"')
    if(Opera) eval('document.getElementById(id).style.visibility = "hidden"')
    }
    
    function show(id) {
    init();
    if(IE) eval('document.all[id].style.visibility = "visible"')
    if(NC) eval('document.layers[id].visibility = "visible"')
    if(Opera) eval('document.getElementById(id).style.visibility = "visible"')
    }
    the code is used, when i click on some link.

    but the problem is, that the layers with hidden images sometimes are loading too slowly. how can i preload them in this case? maybe it is possible to preload them in variables and them call with a script... ?

    i would appreciate any advice. thx :)
  • Logician
    New Member
    • Feb 2007
    • 210

    #2
    Originally posted by blobb
    hi all,

    i have 50 hidden div layers with images insided, each is appr. 200kb big.
    So you're expecting the user to download 10MB of data, and you wonder why it's taking too long?

    If all these images are being downloaded automatically on page load, then preloading isn't going to change anything.

    Presumably these images are JPEGs - have they been web optimised?

    Do you have a URL?

    Comment

    • Grimm
      New Member
      • Apr 2007
      • 4

      #3
      just to agree...50 images at 200Kb each =10000Kb or 10Mb I have not seen the web user that would wait for that size page on High speed let alone dial up. Definatley optimize the images and decrease the size to about 50Kb or less and allow previewing of them render the image as a link that will allow them to load the larger image in another floating dive layer

      Comment

      • blobb
        New Member
        • Apr 2007
        • 12

        #4
        i have optimised them, so now they are about 5 mb heavy.

        what does the float divs mean? what is the difference between invisible?

        Comment

        Working...