Hello,

I have been trying to find a way to load my page in the following way and wondered if there is a solution using PHP/AJAX,etc?

I have a webpage that has an iframe. This iframe contains alot (100 plus) small images and takes forever to load on a 56k dial up or slow connection. I am worried I may be stopping some visitors from viewing the website if they are on a slower connection as it seems to load ok with broadband.

I wanted to try and find a way so that the page loads first and then only once all the content is shown does it load the iframe content. This way visitors can view the main page text/images/etc whilst the iframe window loads.

OR

Is there a way to load a large amount of images more quickly using some sort of code?

Would appreciate any advice!

Thanks
:)

Recommended Answers

All 3 Replies

I would suggest spreading the pictures over a couple of pages. This technique is called pagination. It would be better to spread the pictures over a few pages because using Ajax or Iframes will greatly reduce your search engine ranking. Also try resizing the pictures to half the size then get the browser the set to the correct size with the width= and height= tags.

You also could use a technique called lazy loading (used at cheerusup).
Another thing to keep in mind is a bunch of small images are MUCH slower to load than one larger image.
Another solution, is to have javascript add html after the current document loads.

window.onload=showPics; function showPics(){ document.getElementById('iframe').innerHTML='<iframe src="pics.html"></iframe>'; }

Another thing that was suggested earlier was breaking up the content into pages, called pagination.
There are many ways to do this, but here are a few of my suggestions.

Iconize the images, and have javascript load the full images in the background after the page is loaded
click the icon, the full sized image displays in a div strategically located on the page,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.