SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Enthusiast BerlinIT's Avatar
    Join Date
    May 2003
    Location
    Melbourne, Australia
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript Rollover and Caching Problem

    Hi all...

    I've just created a simple site with a simple javascript rollover.. i've done heaps of these before, and with all of them once both images have loaded, then they are stored in the browser's memory, and each time the image is rolled over and off, the images load super quick from memory instead of being downloaded again...

    however for this site they are not being cached, so when the mouse rolls over, the rollover image is downloaded, then when it rolls off, the original image is downloaded again, instead of being loaded from cache...

    any idea how i can fix this?

    I've tested it, and found that it works fine in Opera and IE5.5, but not IE6 (I've confirmed this on 4 separate PC's). I'm thinking it could have something to do with image size - is there a maximum size that can be cached by the browser?

    the page in question is http://www.suttercain.net/tempsite.html (the main flyer image)

    Any suggestions would be welcome
    Greg
    Berlin IT Services
    - Website Design & Development
    - Content Management Systems

    Located: Melbourne, Australia

  2. #2
    SitePoint Evangelist Mr. Brownstone's Avatar
    Join Date
    May 2002
    Location
    Relative
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Of course, that's just my opinion. I could be wrong.

  3. #3
    SitePoint Enthusiast BerlinIT's Avatar
    Join Date
    May 2003
    Location
    Melbourne, Australia
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey thanks, that looks like an interesting new way to do the same thing. only problem is the image will take twice as long to load, which could be a problem when it is quite large to start with.

    the advantage of having a separate image, wtih preload, is that the behind image preloads while the user is reading the text on the screen, so its quicker all round... well that's when it works anyway.

    any other ideas why it wont work in IE6?
    Berlin IT Services
    - Website Design & Development
    - Content Management Systems

    Located: Melbourne, Australia

  4. #4
    SitePoint Enthusiast kgish's Avatar
    Join Date
    Dec 2001
    Location
    Gouda, The Netherlands
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried using CSS for the rollover effects. CSS takes care of the pre-buffering for you.

    It is also a simpler and more elegant solution for rollovers, I think.
    Kiffin
    Your average future-famous kind of guy...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •