Forum Moderators: coopster

Message Too Old, No Replies

Slow 'showing' of PHP pages

         

wonderboy

3:05 pm on Mar 6, 2004 (gmt 0)

10+ Year Member



Hi,

I have a PHP page set out as below:

Header.php
<html content relevant to this page>
Advert.php
Footer.php

The header loads immediately, but the rest can take 10-20 seconds to show (It is loaded, just not showing)

I view source and upload the HTML as a whole HTML pages, it all loads and shows straight away.

I have never had this problem with using several small PHP files to build one (I use 'require' to insert the header, advert and footer).

Any ideas how to get the page to show all as one, and not have a long gap between loading and showing?

Many thanks,

W.

isitreal

3:37 pm on Mar 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



My guess is that your whole page except the header is contained in a table, the table won't display until all its contents are in the browser, except for images. So if you have tons of elements loading, maybe advertising stuff, the table won't display until it has gotten all its pieces.

If this is the case, it's a problem with how the HTML was written, not PHP.

If it's not the case, you have a very very slow server, but you say that the source is there but you still have to wait 10/20 seconds, is this over dialup or broadband? If the source is actually there it's an HTML problem.

If it's broadband your page is seriously messed up, try making a test page where you include each piece one by one and see if you can pinpoint the problem include, my guess its the advert.

wonderboy

4:01 pm on Mar 6, 2004 (gmt 0)

10+ Year Member



Hi, thanks for the quick reply.

I have created a template which loads fine, and added the rest of the content and it seems to be working fine again. Quite annoying how tempremental it can be.

I am on broadband, and the server I use has been known to be quite 'dodgy' - this may be the reason why it is working ok now, and not before.

Is there any possibilty this has anything to do with cache and internet explorer?

W.

isitreal

1:49 am on Mar 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The test page you gave me took 28 seconds to load over extremely fast broadband, the page is 15 kB for the HTML.

Get a new web hoster, that's completely ridiculous. I use www.pair.com and never have problems like that, and neither will you.