Solved

Page using phpFlickr not showing until all images load

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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)
Simple Linear Regression

729 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