/    Sign up×
Community /Pin to ProfileBookmark

loading or not loading images? (a philosophical discussion)

Hey,

I am currently building a website, and I have it rigged so that the entire page is contained in one .html file, with a matching css file.

The way I set it up is that I have several div tags that are set to display:none, and this is switched onclick with javascript.

The site works pretty well for basic text.

Now I got into an argument with a fellow scripter. One of the pages should include images, an arbitrary amount. This page isn’t the home page. but since all that a page is is a div tag that is switched between display:none and display:block this page loads at the same time as the home page, with the images loading at the same time (later technically since they are only called at the end of the .html file).

(I hope this makes sense)

Now what we were arguing about was bandwidth. He argued that the user might not browse to the images page, and thus loading it took up a lot of bandwidth (more as the number of images increases) that wasn’t necessary. I argued that since the home page loads first (as well as all the other pages which don’t have images), this shouldn’t be an issue, because the user can still use the site while the images are loading in the back ground. If he then no longer needs the site he just closes, no harm done. If he then decides to view the images, they’re there preloaded.

To this he responded that the loading of the images might slow down the loading of other (non associated) pages the user was viewing at the same time.

What he proposed to do was make the images load only once you click on the portfolio page (essentially making it a seperate page). I argued that then the whole benefit of the fast seeming page is gone.

What is the proper course of action here?

to post a comment
Full-stack Developer

5 Comments(s)

Copy linkTweet thisAlerts:
@ryanbutlerAug 05.2008 — I can see the programmer's point of view and if I'm understanding it correctly, he's correct. Having said that, without knowing the infrastructure of how the page is loading, it'd be hard to offer advice or solutions.
Copy linkTweet thisAlerts:
@Declan1991Aug 05.2008 — Regardless of that, it's an inaccessible method. With JavaScript disabled, the user either cannot get any other part of the page, or otherwise are given the entire content of the site.

The only other downside is that you are forcing the user to download a lot of unnecessary information, and the server to upload it. Since the page loads sequentially, the user shouldn't notice any delay due to the extra amount of images on it, except on pages loading other than your page. You cannot be sure without seeing the page though.

Personally, I'm against the idea. It suffers from nearly all of the problems that frames do, and you are forcing the user to download data they may not want.
Copy linkTweet thisAlerts:
@StaedlerMarsauthorAug 05.2008 — But why is he right?

The entire page loads before the images start loading, so all the text, and all the pages except the portfolio page are finished. If he needs the portfolio page this gives it time to finish loading.

Sure, this grabs bandwidth from other sites loading, but isn't that not my problem? All this assures is that the items that my site are loading are first in queue when it comes to downloading.
Copy linkTweet thisAlerts:
@StaedlerMarsauthorAug 05.2008 — Sorry Declan, I hadn't seen your post.

I know the javascript switched off problem. But that's not the point. That's the same issue as someone who doesn't have flash. I'm ultimately going to have to build the site with separate pages anyway for exactly this reason. Right now it's basically just an issue of pre-loading images or not.

The rest of my post still stands though.

EDIT: good point on the server side uploading. I hadn't really thought of that.

as a solution i'm probably going to make an entire new page for the image gallery.
Copy linkTweet thisAlerts:
@ryanbutlerAug 05.2008 — I look at it two ways: if bandwidth is the issue, the programmer's point of view is absolutely valid. if bandwidth isn't the issue, then if your description of page load is correct, then his point of view regarding load issue more than likely isn't relevant.
×

Success!

Help @StaedlerMars 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.20,
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,
)...