www.webdeveloper.com
Results 1 to 6 of 6

Thread: loading or not loading images? (a philosophical discussion)

  1. #1
    Join Date
    Aug 2008
    Posts
    3

    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?
    Last edited by StaedlerMars; 08-05-2008 at 01:19 PM.

  2. #2
    Join Date
    Nov 2006
    Location
    Springfield, MO
    Posts
    1,541
    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.
    Ryan Butler

    Ryan Butler.org

  3. #3
    Join Date
    Aug 2007
    Posts
    3,767
    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.
    Great wit and madness are near allied, and fine a line their bounds divide.

  4. #4
    Join Date
    Aug 2008
    Posts
    3
    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.

  5. #5
    Join Date
    Aug 2008
    Posts
    3
    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.
    Last edited by StaedlerMars; 08-05-2008 at 03:05 PM.

  6. #6
    Join Date
    Nov 2006
    Location
    Springfield, MO
    Posts
    1,541
    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.
    Ryan Butler

    Ryan Butler.org

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