Solved

Page using phpFlickr not showing until all images load

Posted on 2010-08-31
4
291 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mysql sync between 3-4 mysql db 4 24
Centering Vertically 3 27
T-SQL:  Sigh---Boy, this is fun.... 12 25
Configuring a checkbox in CSS and php 18 30
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

919 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now