Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Page using phpFlickr not showing until all images load

Posted on 2010-08-31
4
294 Views
Last Modified: 2013-11-13
I'm using phpFlickr to load images from photosets from Flickr. The page isn't showing until all the images load. I want the images to start showing before they're all loaded so the page doesn't look like it's broken. Is this normal behavior, and if so, is it possible to stop?
0
Comment
Question by:cowboygeek
  • 2
  • 2
4 Comments
 
LVL 34

Accepted Solution

by:
Beverley Portlock earned 500 total points
ID: 33575820
This often depends on a mix of the browser and how the page is built. For instance, with Opera it waits until the whole pages is downloaded and then draws the page. I have always found this behaviour irritating. With other browsers it depends....

The browser often has to wait until a layout element is complete before it can compute the precise details of displaying it. If your images are within this layout element then they wait too. I have seen people send a near empty page down and then post-populate the divs using Ajax.

Try loading each image set in a separate TABLE or DIV so that the broswer can figure out what it has to do at the end of each </TABLE> or </DIV>. I'd be tempted to use a table with one row and one column as a container for the images as a table has the hasLayout property.

0
 

Author Closing Comment

by:cowboygeek
ID: 33583843
I actually do have them in tables already. My temporary solution is to separate the thumbs into pages so fewer of them load at once. I'll look into the Ajax solution; would that require Javascript? I'm not too familiar with Ajax.
0
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 33584089
Yes. The "J" in ajax stands for javascript but there are frameworks that can help with it. JQuery is a popular one and for PHP, SAJAX can be straightforward too.
0
 

Author Comment

by:cowboygeek
ID: 33601187
Excellent, thanks! I'd give you points if I could. I'm very experienced with jQuery, just never used it for Ajax before. Thanks!
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question