#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    3
    Rep Power
    0

    CSS background images load slowly via SSL and never seem to be cached


    When accessed via http my CSS background images all seem to be loaded by the browser and then cached for future use. So, the first time a page loads it may be a litttle slow but after that it's fine.

    However, when accessed via https the images never seem to be cached and are always slow to load. The CSS defines the background images with relative paths and does appear to use the current scheme correctly.

    Images included via the <img> tag don't seem to be affected in the same way: they cache in both scenarios.

    Does anyone know if this is a limitation of CSS/browsers in general/only some browsers/SSL or maybe a configuration problem somewhere?

    Thanks in advance!
  2. #2
  3. Resident DJ
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    283
    Rep Power
    14
    To be honest, I'm not really sure. But you're not alone - I've noticed in some instances of things like this happening.

    Most recently it happened with WebSphere, IE6 on XP - yet on my IE6 on win2000 (viewing the same site) the problem didn't appear (and this was on multiple tests of this 'phenomena') However, as you described, everything loaded from an <img> object properly, it was mainly backgrounds from CSS that did not.

    At the same time, we have the same product on Solaris & Tomcat on Windows - never had this problem (with the same PCs used) which makes it even odder.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    3
    Rep Power
    0
    Just to know that others have seen it is good to know, thanks! My further tests seem to show that some browsers/platforms are much worse than others (e.g. IE6 on XP seems OK for me but Safari on OSX isn't.)
  6. #4
  7. Über nübe
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Babylon 4
    Posts
    240
    Rep Power
    12
    Could it be something related to browser settings, i.e. check cache "Everytime I view the page" ?
    Hello, old friend...
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    20
    Are you sure this is not default?
    I though the default was for SSL pages not to be cached for security issues.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    3
    Rep Power
    0
    Originally Posted by degsy
    Are you sure this is not default?
    I though the default was for SSL pages not to be cached for security issues.
    Maybe, but it seems odd that some page components (e.g. <img> tags using https urls) do seem to be cached whereas other components (in this case background images defined in CSS) are not cached.

    Anyone know of any documentation for controlling SSL caching with Apache? I've searched hard but can't find anything useful.

    One thing though...the pages are all PHP generated and have "standard" headers to avoid caching. These don't seem to stop images being cached though since performance through http is as expected and images are not constantly reloaded.

    I'll keep digging!

IMN logo majestic logo threadwatch logo seochat tools logo