Forum Moderators: open

Message Too Old, No Replies

Is is bad to use an iframe?

         

Crump

6:55 am on Mar 21, 2006 (gmt 0)

10+ Year Member



Is it bad to have iframe tags in your HTML? I got a replacement textarea that I am using that has more features, and it uses iframe. Any thoughts?

BlobFisk

9:22 am on Mar 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you considered using a <div> and using CSS to give it scrolling?

kaled

11:45 am on Mar 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are two issues with <iframe>

1) Content may be indexed separately by search engines.
2) Unlike <div> and other html elements, automatic resizing according to the requirements of the content is not supported.

If you can live with these, <iframe> is ok.

Kaled.

tedster

2:40 pm on Mar 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also remember that the text inside the iframe will NOT be seen as part of the parent page content by search engines.

dj_gie

4:16 pm on Mar 21, 2006 (gmt 0)

10+ Year Member



How do you actually display another webpage using a <div>

I thought you could only do it with a <iframe>

?

kaled

4:42 pm on Mar 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can't display a web page with a <div>. However, you could use SSI.

Of course, if there was anyone in charge of setting standards who's brain worked better than a retarded amoeba, we would have <div src="url"> or something similar.

Kaled.

Crump

5:31 am on Mar 22, 2006 (gmt 0)

10+ Year Member



What about spyware implications of using iframe? Are there any. I know spamassassin and other spam blocking software would block iframe in email. Is the same true for using on a webpage?

ffoeg

9:06 am on Mar 22, 2006 (gmt 0)

10+ Year Member



wouldn't using a <div src="url.html"> basically make the div using the src the exact same as an iframe?

kaled

11:16 am on Mar 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No. A <div> can be resized automatically according to the contents.

Think of this way, client-side includes exist for images but not for text. Whilst SSI has other uses (such as including dates) it is mostly used for including text. The fact that SSI is used for including text proves that there is a requirement for this. Yet, the CPU burden is placed on the server instead of the clients - this is just plain stupid. It does reduce the number of http requests issued by the client, however, if the included data is on another server, it has to be relayed to the client instead of being collected by the client directly.

Now, does that sound sensible to you?

Kaled.