Jump to content

Controlling Web Page Loading


aspiring_geek

Recommended Posts

Please help. When my web pages load they load the the text first and images afterwards and it looks very horrible. Can I mask this using some php code to dispaly a blank page while the images are loading or even better control the order in which they load. Every website I visit seems to have this except mine. Thanks in advance

Link to comment
Share on other sites

Excuse me, but do you consider forcing the user to wait for the images a bad thing? I sure don't. Especially since text should be your site's primary focus... unless maybe it's a gallery of some sort.If it is, then the best you can do is specify explicit dimensions for each of your images, like:

<img width="320px" height="240px" />

(assuming the image is 320x240 pixels)That way, the images will not load instantly with the text (again - this is a good thing in my book), but at least the layout won't "jump around" as they load.Additionally, if you indeed have a gallery of some sort, make sure that you're using thumbnails for the images, not full size images. Also make sure they're static. Don't use PHP to generate them upon request (do use PHP to generate them upon upload though).

Link to comment
Share on other sites

Here's an example of a loading screen for an entire site:http://choiceuniversity.net/That's done with Javascript and CSS. That's needed on that site because the user needs to download around 1MB of Javascript code in order to even do or see anything, so they need to wait at the loading screen until all the code finishes downloading and they can actually start using the site. I'm not sure if it's a good idea to do something like that for a regular site. Imagine someone coming on dialup (which apparently a lot of home users still have). If they're waiting for all of your images to download before they can even see your site, they might be looking at a loading screen for a minute or more. Most people I know aren't going to wait a minute for a site to load if all they're looking at is a loading screen, they'll just move on to the next site, especially if they don't know how long it's going to take to load (no progress bar).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...