?
Solved

Page using phpFlickr not showing until all images load

Posted on 2010-08-31
4
Medium Priority
?
303 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
[X]
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
  • 2
  • 2
4 Comments
 
LVL 34

Accepted Solution

by:
Beverley Portlock earned 2000 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Six Sigma Control Plans
Progress
Suggested Courses

752 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