Web Analytics Made Easy -
StatCounter preload image DOMwise - CodingForum

Announcement

Collapse
No announcement yet.

preload image DOMwise

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • preload image DOMwise

    Will this code suffise to preload two given images into the browsers' cache, before the page has loaded?

    PHP Code:
    // preload images
    tipTransparentImage = new Image();
    tipTransparentImage.src 'images/bg.png';
    tipTransparentBgImage = new Image();
    tipTransparentBgImage.src 'images/bgs.png'
    Last edited by _com; Aug 2, 2005, 04:10 PM.
    Information is not knowledge,Knowledge is not wisdom,Wisdom is not truth,Truth is not beauty,Beauty is not love,Love is not music and Music is THE BEST. Frank Zappa

  • #2
    It will load images. I can't tell you if it will load them before the page has loaded.
    Forget style. Code to semantics. Seperate style from structure, and structure from behaviour.
    I code to specs, and test only in Firefox (unless stated otherwise).

    Comment

    Working...
    X