View Full Version : Future-proof iframes
Burgin
03-16-2010, 10:31 AM
I'm sure I've read a comment in a post on here that iframes won't be supported in forthcoming browsers or have I dreamt it? If it's true what alternatives are recommended?
Any comments appriciated.
djr33
03-17-2010, 06:09 AM
iframes are not THAT risky-- they will be here for a while at least, but perhaps start to be phased out in a couple years.
There is no easy other way to do this.
Here are some options:
1. frames-- they're a bit "better" than iframes, though I'm not sure why-- but everyone seems to agree on this-- I guess it's that they're more predictable to work with, though give less control.
2. AJAX-- the problem here is that there are security restrictions (for example, the page must be on the same domain), they are more complex to work with, and only supported by some browsers-- at the moment much less than iframes, though in 10 years that might be reversed-- but I wouldn't bet too much on that-- it's hard to predict what will happen.
3. Using a server side method to include one page in other. Of all possibilities this is by far the best but can also get complex, though I believe it's worth it--- it functions on the server and thus doesn't matter what the user is browsing with-- it'll always work. This means you must have PHP, ASP, or CGI, etc. setup on your server, though there are many options. Most likely you'd be best looking into PHP if you're not sure.
BLiZZaRD
03-17-2010, 06:28 PM
4. Flash. Just do everything in Flash. Full Screen without options to re-size.
(sorry, just wanted to say that).
djr33
03-17-2010, 08:04 PM
But does that actually allow for outside content to be loaded?
Of course using a plugin (including flash) is an option, but I'm not sure how easy/useful that would be if trying to load html into the page-- but it could create another way to approach the problem.
BLiZZaRD
03-17-2010, 10:41 PM
Sure it does. You can dynamically add content through PHP, JS, XML, TXT, SQL... almost anything really, even other Flash files.
The down side to that argument (and I am not supporting a Flash only website, just stating it can and is being done) is if the end user has flash and/or JS disabled or off.
But then again, if you have good content, people will want to see it. Look at pogo.com. They run a full flash site (for the most part) and I don't think their 1 - 2 million page hits per month are affected by those that have Flash disabled.
molendijk
03-18-2010, 01:28 AM
You can replace your iframe with a text/html object in all browsers, except in IE, Opera and Google Chrome, where you may encounter problems if you want to do with the object what you normally do with the iframe. By the time the iframe will be gone (in 2100, or later), the object will be something that behaves the same in all browsers. So don't worry.
Arie Molendijk.
===
Burgin
03-19-2010, 12:30 PM
Thanks everyone for sound advice!!
Steve Sea
03-28-2010, 08:20 PM
Hi Guys
Just finished my site having to use an Iframe (not my code) Google maps,
even worse I've a liquid site everything re-sizable images, Swf's. and had trouble with the G.map <iframe> but managed to do it.
Now you tell me its on its way out :confused:
Here's my page just in case you want to play.
http://www.cps24.fr/map.html
I've tested in IE & Firefox all OK
any one fine any probs drop me a line please :)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.