Jump to content

ob_start but css still renders layout late in ff


scottieclark

Recommended Posts

Hi,

 

this, i think, is a 'php in firefox' issue despite me mentioning css in the title so please read on!..

 

please have a look, using firefox, at http://www.laureleroch.com/gallery.php...

 

As you can see, when choosing different images via clicking on the thumbnails the page reloads and there's an amount of time where we see the page loaded without css applied..., however doesn't seem to be happening in IE9, opera, chrome, or safari. It IS happening in firefox on W7 and OSX.

 

the file gallery.php has...

 

<?php
session_start();
ob_start();
include("scripts/php/gallery_display.php");
include("scripts/php/file_reader.php");

 

...as its start...and...

 

 
</body>
</html>
<?php ob_flush() ?>

 

..at its end.

 

I can post all the code from the includes if required. I'd say there's a fair bit of processing done by these includes but really, not THAT much, plus other browsers seem to be doing ok with it.

 

Also, the background images are big. That's a fact. The site will be in this way and I plan to use a preloader once I get the main build sorted...nearly there.

 

One other thing...I really am a coding newbie. I've been toying with it for years, first with actionscript in flash, then html/css and now I'm getting really into php, however I'm sure my coding is pretty inefficient here and there thru nothing other than pure, undiluted ignorance...good, eh?!

 

so, if anyone got some pointers that would be really brilliant... any other info required - please shout.

 

cheers,

 

Scott

 

Link to comment
Share on other sites

Wasn't too noticeable on my FF on OSX.  Any reason you're using a php file for the css?  It's possible that since it's a php file there may be some disabled caching where it's fetching the stylesheet on each page load.  It could also be that it's taking just enough time to draw the stylesheet in php that firefox is displaying the page before it's completely received the stylesheet, while the other browsers are waiting to show anything until they finish loading the stylesheet.  (Those are guesses, I don't know if any of those thoughts have any element of fact to them but they sound good)

Link to comment
Share on other sites

beautiful! they sure do sound good... i'm not sure i even care if there's any element of fact to them...might just go with that ;)

 

however, in the interests of getting the site working...

 

I use a php file for css as it lets me dynamically update variables within the css, which is pretty cool. works well in other sites i've built.

 

**STOP PRESS**

 

just checked the php file i'm using for the css and in this case i'm not replacing anything dynamically so no need for php there! tried a css file instead and bingo!..problem gone! Thanks man!

 

so... now i'm wondering why? will investigate...

 

if i find anything i'll update this thread...

 

thanks again!

 

over n out

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.