/    Sign up×
Community /Pin to ProfileBookmark

Images and HTML

I am designing my first website using HTML, and im trying to incorprate more HTML than .gif images, but just for this websites case..

i would like to know is there any way, that you can pre-download image files before the homepage is accessed, so that as you scroll through the pages they load quicker. For example. My header is made up of about 4 images, and my sidebar is made up of about 3 images, rather large files. But they stay consistant throughout the website. So what i did was, where the images are the same throughout each page, i named them the same name, so they get downloaded only 1 time per session. There are about 6 other random images that i would like to download upon first load so as to make the site look alot better. Once you visit it youll know what i mean, and if you have 56k youl definatly know what i mean.

[url]www.epicri.com/cm/home.html[/url]

If there was a way that i could download all of the different changes to the banner before the homepage loads, it would look alot cleaner as you were going through the site.

I hope that isnt confusing, sometimes im afraid i use the wrong terminology when refering to things. Anyway i thank you in advance!

Chris

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@zingmatterFeb 17.2005 — You can do this using javascript to load images, even if they're not displayed, so that they'll be saved in the user's cache. I would suggest this occurs after the home page has loaded so as not to block it up.

in the <head> section place this code:
<i>
</i>&lt;script type="text/javascript"&gt;

function loadImages() {
//do this for each image
//remember to put the correct path to your image
var somepic = new image();
somepic.src = "somepic.jpg";

}
&lt;/script&gt;

And in your <body> tag:
<i>
</i>&lt;body onLoad="loadImages()"&gt;

Hope this helps
Copy linkTweet thisAlerts:
@cjbeck71081authorFeb 17.2005 — Can i do this on a splash page? And insert a progress bar?

i.e. a screen that just has the company name on it, and Progress bar that turns into "Enter Here" when its done.


If so, what direction should i take in implimenting this into the website.
Copy linkTweet thisAlerts:
@zingmatterFeb 17.2005 — I would suggest not using a splash screen, particularly one that holds up visitors from getting to the important information on your home page. They'll hit the 'back' button before the first image is loaded. Your best bet is to try to stall them on the home page with content that they'll be reading while in the background the extra images are loading.

I would say that if images are taking ages to load because they are very big then you really must cut down their size. If you need visitors to see good pictures then offer thumbnail images which they can click on to see the full size picture (which they will be more likely to wait for).

Again, splash screens are not good for lots of reasons, so resist the temptation to use one.

Hope this helps
Copy linkTweet thisAlerts:
@cjbeck71081authorFeb 17.2005 — Thank you very much you have been a great help, i will play around with the homepage, and not use a splash. We are only talking about differences of half seconds, i just figured if at a very minimum the changes to the banner could be preloaded that will help. Thank You Again, u are a lifesaver.
×

Success!

Help @cjbeck71081 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...