How to prevent the white 'flash' on page load?

Can I easily control the order in which things load on a page of mine?

  • I need some help fixing a web page. Images load in the wrong order, and users are finding it confusing. I have a free album uphttp://www.fakeproject.com/you_are_not_dead/, and it's gotten about a zillion views, which I'm very happy about. But many users report that the images of the book pages don't show up. As it turns out, in Firefox (by far the most popular browser that visits the site) they do show up, but they are displaced below the Flash player that plays the album until the entire page loads. Is it possible to force the pages to load right next to the player? This must have to do with the way Firefox renders things, but the few hacks that I've tried on the code have not changed the order that things appear. Any advice would be much appreciated.

  • Answer:

    I haven't played with any fix, but I'd guess the issue is that Firefox is assuming that the object tag is a 100% width item, and so pushes the following td tags to the next row. But then when flash finishes loading, it realizes that isn't the case, and redoes the layout. First fix: try to set a width (css style attribute) on the object or td containing the flash file. Second fix: get rid of the td tags, and use floated divs. (float them all right).

fake at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

You can't control the order of loading at all.

Chocolate Pickle

Agree with cschneid, usually setting fixed heights and widths of elements helps with this kind of thing. You could try to get fancy by loading the flash player last via Javascript but I'd do that as a last resort if setting the sizes doesn't work.

bitdamaged

You can't control image loading order, but if you set appropriate dimensions on everything (especially the actual img tags), this will help with the layout flow as things are loading. Changing from TDs to DIVs is probably not going to help this at all.

beerbajay

To be honest, you CAN control load order with a bit of javascript, but I don't think it's what the poster is looking for, anyway.

syzygy

OK, so consensus at this moment is to specify the widths and heights on all my TDs. I'll give that a shot tomorrow morning and see if it helps.

fake

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.