By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,378 Members | 1,435 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,378 IT Pros & Developers. It's quick & easy.

IFrame compatible browsers

P: n/a
Hi All:

I'm writing a page that I'm going to need some assistance with, using
the IFrames... I know how to use them, but what I'd like to do is
write a page (using ASP here BTW) that has 2-5 IFrames on the page
(different content) BUT the trick is that I need to find a method of
providing the same information OUTSIDE of the IFrame for people who
have older browsers.

Any thoughts? I was thinking to simply detect the browser type/version
and display different content which is fine, I just need to know which
are compatible with IFrames and which aren't. I can't seem to find a
list anywhere...

Any thoughts or assistance are gratefully appreciated.

Jeff
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Jeff <je**@castingworkbook.com> wrote:
Any thoughts? I was thinking to simply detect the browser type/version
and display different content which is fine, I just need to know which
are compatible with IFrames and which aren't. I can't seem to find a
list anywhere...


You don't need browser sniffing. Just include alternative content in the
IFRAME element. See the first example at
http://www.htmlhelp.com/reference/ht...al/iframe.html

Better yet, use some other mechanism to assemble content from multiple
sources into a finished page. See also
http://www.htmlhelp.com/faq/html/des...l#include-file

Besides, some browsers can be configured to support inline frames or not to
support inline frames, so in this case, browser sniffing is even more
unreliable than it normally is.
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"If you aren't part of the solution, then you are part of the precipitate."
Jul 20 '05 #2

P: n/a
Jeff wrote:
I'm writing a page that I'm going to need some assistance with, using
the IFrames...
Why? Frames of any sort are rarely the best (or even a good) solution for a
problem.
BUT the trick is that I need to find a method of
providing the same information OUTSIDE of the IFrame for people who
have older browsers.


<iframe ...>
Alternative content
</iframe>

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #3

P: n/a
On Mon, 22 Dec 2003, Jeff wrote:
IFrames... I know how to use them
[If you did, you'd be ahead of the W3C, as we will see...]
BUT the trick is that I need to find a method of
providing the same information OUTSIDE of the IFrame for people who
have older browsers.
Why does everyone seem to ask for a "trick", before even finding out
whether there's a properly-engineered solution?
Any thoughts?
Like, er, read the HTML specification, with the usual critical
attention to detail.
http://www.w3.org/TR/html401/present/frames.html#h-16.5
I was thinking to simply detect the browser type/version
Well, stop thinking that at once! It can't be done if you're
otherwise conforming to web best practice (think: proxy caches), and
even if you _do_ get a user agent string, it could easily be a browser
pretending to be something else.
I just need to know which are compatible with IFrames and which
aren't.


The *browsers* already know whether they support iframes or not.
There's no need for you to duplicate this knowledge. Just supply the
properly marked-up content.

See where the W3C sets this terrible example in their spec? -

<IFRAME src="foo.html" width="400" height="500"
scrolling="auto" frameborder="1">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="foo.html">the related document.</A>]
</IFRAME>

Any discerning author can see that the content of the element could be
worded so as to adapt seamlessly to the situation. As TimBL himself
said way back, and it's still a good principle: "don't mention the
mechanics". And that's precisely what is wrong with the above
example, in my estimation. http://www.w3.org/Provider/Style/

So, put your friendly content in there. Don't give the reader the
impression that you're dissatisfied with their browser - you aren't
going to win any new friends that way.
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.