dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: how to preload images without the use of JS and CSS?

  1. #1
    Join Date
    Apr 2005
    Posts
    634

    how to preload images without the use of JS and CSS?

    Hi,
    I have a web page with alot of images on it. I'd like to pre-load those into a browser first before display to the user.

    I see a lot of examples are done in JS or in CSS, and I'm not interested at using any of those methods. Are there way I achieve the same affect maybe too the <meta> tag to do something within the <head> tag?

    Thank you for your time.

  2. #2
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    Quote Originally Posted by sirpelidor
    I see a lot of examples are done in JS or in CSS, and I'm not interested at using any of those methods.
    Urm, wow. Do you fully understand what HTML is?
    HTML defines the structure and conent of a webpage in the same way that CSS defines its appearance and Javascript defines its behaviour.
    Quote Originally Posted by sirpelidor
    Is there way I achieve the same affect maybe [...] to do something within the <head> tag?
    Well you may be able to give some hints the browser using the link element, but the results (if any) wouldn't be consitent.

  3. #3
    Join Date
    Oct 2005
    Location
    Gold Coast, Australia
    Posts
    2,115
    Quote Originally Posted by sirpelidor
    Is there way I achieve the same affect maybe [...] to do something within the <head> tag?
    Why not just use some inline css?

  4. #4
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Well it can't be done in HTML because that just defines WHAT is in your web page. To preload anything you need to hide it which means defining its appearance and that means CSS. You could put the images at the bottom of a preceding page and then hide them from view in that page using CSS so that they are already downloaded before the page on which they are to appear is loaded. To preload them in the page that they are to appear on can use the same method for hiding them initially from view but would then require Javascript to unhide them since it involves changing the appearance or content of the page.

    HTML = content
    CSS = appearance
    Javascript = dynamically changing content and/or appearance

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles