There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware network networking nvidia outlook outlook 2003 outlook express partition printer problem ram router slow sound sprtcmd.exe trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
preloading images question


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
firestormer's Avatar
Computer Specs
Senior Member with 1,353 posts.
 
Join Date: Sep 2005
Location: UK
Experience: Skilled: Know all i know and little else
08-Jul-2008, 12:06 PM #1
preloading images question
I have a website that has different boarders depending upon the section you are in. Those boarders are made up of 8 small png's.

If i where to add the png's of a another section hidden at the end of a pages html. Would they load and be stored in the browsers cache thus speeding up the rendering of the next page?

If this is possible how can i achive it.
__________________
You say deviant like its a bad thing...

TSG has made me snow blind.
firestormer's Avatar
Computer Specs
Senior Member with 1,353 posts.
 
Join Date: Sep 2005
Location: UK
Experience: Skilled: Know all i know and little else
08-Jul-2008, 12:27 PM #2
Ok im part the way there. I can preload images using Java script but is it possible to preload after the body?
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,716 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
08-Jul-2008, 12:38 PM #3
Quote:
Originally Posted by firestormer View Post
If i where to add the png's of a another section hidden at the end of a pages html. Would they load and be stored in the browsers cache thus speeding up the rendering of the next page?
Yep. You can do it with JavaScript (as you have learned) or CSS.

Peace...
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,716 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
08-Jul-2008, 12:38 PM #4
Quote:
Originally Posted by firestormer View Post
Ok im part the way there. I can preload images using Java script but is it possible to preload after the body?
What do you mean "after the body"? Do you mean after the page fully loads?

Peace...
firestormer's Avatar
Computer Specs
Senior Member with 1,353 posts.
 
Join Date: Sep 2005
Location: UK
Experience: Skilled: Know all i know and little else
08-Jul-2008, 12:40 PM #5
after the page is loaded i want it to load preload images from other pages that the user is most likely to visit.
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,716 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
08-Jul-2008, 12:42 PM #6
If you are using JavaScript and put the pre-loading of images in a function, you can call that function with the 'onload' event handler, like this:

Code:
<body onload="preloadImages()">
Then, your JavaScript function is called after the page has loaded. Of course, you change "preloadImages" to the name of your actual JavaScript function.

Peace...
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:50 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.