Content laggy on mouseover

Discussion in 'HTML & Website Design' started by pHrEaK, Nov 21, 2011.

  1. #1
    Hello all, I was wondering if there was a way to pre-load content on a webpage...that question might seem redundant as content loads when the page loads but I will explain what i have going on.

    I have a set of buttons, which are actually images, that use JavaScript to change 'onmouseover', 'onmousedown', and 'onmouseout'. Whenever i run the site off a virtual server where the images are hosted on my machine I have not problem with this. However once they are uploaded to a remote server and the site references them from this remote server they are quite laggy.

    When I say "laggy" i mean once the 'onmouseover' function is executed it takes a second or two for the image change state instead of being instantaneous.

    My guess as to why this is happening is due to the size of the image, which i wouldn't think would be big enough to cause this kind of lag ~32kb, or the file format. The format I've used for the images on the site is .png


    I was thinking that if there were a way to preload the images that load 'onmouseover', 'onmousedown', and 'onmouseout', this would take care of the lag issue??? Am i on the right track here or does anyone else know a simpler way to solve this issue?
     
    pHrEaK, Nov 21, 2011 IP
  2. Rising_Star

    Rising_Star Active Member

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #2
    32 kb per image is not efficient when you are using too many images... may be you should first try optimizing your images .. there are some free softwares available for that... check if that works at first
     
    Rising_Star, Nov 21, 2011 IP