Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

i-frame issue in php page

it's too sloooooowwww!!



7:19 am on Feb 19, 2002 (gmt 0)

10+ Year Member

hello script gurus,

i have an i-frame in a php page. inside the i-frame is a three question form and another i-frame containing output from a mysql query.

problem: the page loads fine with the exception of the i-frame, which seems to take forever to catch up. if a visitor scrolls before the i-frame has finished loading it makes wacko patterns all over the place.

question: is there an alternative to i-frames that loads *fast*?

notes: I have tried include() but i can't get it to work properly because the form jumps out of the area it's supposed to remain contained in and fills the whole screen. It's definitely the i-frame because when I take it out completely the rest is super fast!

thanks in advance for any help


8:53 am on Feb 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

On a hunch -

Is your iframe within a table, and/or not of a set size?

It sounds like everything is having to load and then the browser is rendering it. Thus leading to the whole page appearing only after the slowest element has loaded.

Check out each page seperately and get the speeds - see which is the slowest -- the try a combination of the simplest iframe inclusive page layouts and see how that goes. eg. no tables with iframes in.

Let us know if that starts to shed some light on this.


9:05 am on Feb 19, 2002 (gmt 0)

10+ Year Member

hello gethan and thanks for responding.

the whole page loads and is immediately visible. only the i-frame remains blank, which it does for probably 10 seconds and until it's loaded the rest of the page gets wacky when the visitor scrolls.

the i-frame is within a table and it does have height and width specified.

is there something else I can check?


5:06 am on Feb 20, 2002 (gmt 0)

10+ Year Member

What's an I-Frame??


8:31 am on Feb 20, 2002 (gmt 0)

10+ Year Member

hi circuitjump,

an iframe (inline frame) allows you to float a frame in a page without the need for a complete frameset...

there's an example here:



1:01 pm on Feb 20, 2002 (gmt 0)

10+ Year Member

I've never really known about it till today after reading this post. I went to check my HTML books and sure enough it was in there.

Thanks sarkye


1:40 pm on Feb 20, 2002 (gmt 0)

10+ Year Member

Is the framed page slow loading when called from the address bar?
Is the framed page's framed page slow loading when called from the address bar?


3:19 pm on Feb 20, 2002 (gmt 0)

10+ Year Member

hello mdharrold...

the framed page is not slow loading when called by itself from the address bar.

it's only when the full page is called that this happens

and circuitjump, you're welcome :)

(edited by: sarkye at 3:36 pm (utc) on Feb. 20, 2002)


3:33 pm on Feb 20, 2002 (gmt 0)

10+ Year Member

here's another interesting thing... if the page is called twice during the same browser session, it loads like hit off a hovel the second time!


3:39 pm on Feb 20, 2002 (gmt 0)

10+ Year Member

I've used iframes for a while and never had problems with speed.
Could you sticky the url or put it in your profile?


3:43 pm on Feb 20, 2002 (gmt 0)

10+ Year Member

hmmm.. my profile

I'll go with the sticky mail I think.

Thanks for taking this time!


4:20 pm on Feb 20, 2002 (gmt 0)

10+ Year Member

On "tag/j_tag.html" page you have <iframe src="tag.php" width="180" height="200" frameborder="1" scrolling="yes"></iframe><noframes></noframes>.
The <noframes> tags could be slowing it down since that page is a little slower to load than the tag.php.

BTW - both of your frames call for the "j_tag.css" style sheet. I think pages inside iframes inherit the css from the upper pages. So your call for this on "tag.php" is not needed. This would not slow it down but does increase bandwith usge.

I have added your site to my bookmarks. Quite entertaining. "Arnie calls" is making my son think I'm insane.


4:59 pm on Feb 20, 2002 (gmt 0)

10+ Year Member

thanks so much mharrold...

i removed the <noframes> tag but didn't touch the .css reference initially because I was pretty sure it did have to be there and nothing changed.

so I tried removing the .css references from both the framed .html page and the inside .php page one at a time and the only difference was that I lost all my style formatting :(

back to the drawing board I guess, but thanks again for looking at it :)

thanks for bookmarking too... glad you like it :)

::added afterwards:: I just had a thought, I'm going to try that second .php page as an include in the inside frame to enable removal of that second .css call... I'll report back in a few seconds


5:23 pm on Feb 20, 2002 (gmt 0)

10+ Year Member

It is loading pretty quick in IE 6.0 and Netscape 6.2. Opera 6.1 is choking on something when trying to access the php frame.
If I call the php frame alone, it loads very quick.


5:35 pm on Feb 20, 2002 (gmt 0)

10+ Year Member

yes, it's loading quick now on a refresh, I haven't tried it in a new browser session yet though, still working on getting my scroll back when the entries extend longer than the table allows.

in fact the frame containing the mysql result seems to be just stretching everything down, I may have to go back to a second i-frame and forget the include method.

::after:: now it seems to be flying, but I've gone back to the second i-frame!? i'm afraid to try this page on anything below a 6th generation browser! LOL


5:48 pm on Feb 20, 2002 (gmt 0)

10+ Year Member

well, I don't know what to say..

maybe it's like a dog and just wanted to be played with but it seems to be working like a charm now.

Did going back to the second iframe help Opera 6.1?


2:41 pm on Feb 20, 2002 (gmt 0)

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Pass it to me - I'd like to see this. I'm using Iframes on several pages without incidence. I'm thinking of adding an iframe to all the page of wmw - so I'd be real curious to see the site myself if that's ok Sarkye.


11:10 pm on Feb 21, 2002 (gmt 0)

10+ Year Member

no problem :) it's in your SickyMail now, thanks Brett


9:14 pm on Feb 25, 2002 (gmt 0)

10+ Year Member

I am embarrassed to say the least... fixed, not fixed, fixed, not fixed...

after Brett's examination of the site the answer is finally here!

there are some embedded sound files on the page... those files pre-loading is what was slowing the thing down.

a thousand thank-you's to everyone who tried to help with this and especially to Brett for hitting nail on the head finally.

...and congrats to me on my 100th post!


Featured Threads

Hot Threads This Week

Hot Threads This Month