From my experiments of desktop/web design in my website Fsvieira Desktop, I concluded a few things about Iframes:
To get on context, my website goal is to experiment on web and desktop design concepts heavily based on Ubuntu unity desktop design.
Right now most of my applications are more like websites, this is because I am unifying my old websites into this project. But that doesn’t really matter because web applications are still websites, except that the user interaction concept are different.
The title of this post is Iframes are bad, so why did I use iframes in my “applications”?:
- It is easy to setup other websites as an application using iframes, I just had to load the url in the iframe, so my existing websites are easily integrated,
- It keeps the “host” environment clean: I don’t have to be concerned by js/html conflicts, like clashing name-space, id’s or css…
- I had participated in other projects that are not in my server (And they are not supposed to be), so the only way to get them integrated in my website is with an iframe.
So why are iframes bad:
- The “host” website can’t communicate with an iframe (unless using some kind of a hack),
- Iframes work as a independent browser window or tab/separator,
- Bad navigation: link or address are redirected to a new window/tab or to the iframe itself and the url will not show in the browser meaning that there is no easy way to share a link to the iframe content,
- To properly show Iframe content all needed resources must be loaded even if the “host” website have already loaded the same resources,
- Search engines may land on a page that is supposed to be embedded on the “host” website with an iframe, making this page out of context and with no back links to the main website.
Like someone else said Iframes are just another html tool, that can be used or abused.
Sometimes iframes are used as hack to get a third party service information or website.
The benefits of using an iframe is that everything loaded in the iframe will not interfere with the “host” website, making it very good to embed third party widgets, services or whatever.
So a good use case of iframe would be embed a youtube video or something like that.
When Iframes are abused the benefits became the problem.
A bad use case of a iframe is when its used to structure a website, because its hard to control the loaded content and website navigation and resources are not used properly everything must be reloaded on an iframe so it can show the content properly even if some resources are available in the already loaded “host” website.
Conclusion To Fsiviera Desktop Project
One of the main problems with Fsvieira Desktop is that it doesn’t have any content since everything is loaded with iframes, so search landing pages will probably be the so called “applications” that are only independent websites with no links to the “desktop site”.
Unifying all this websites in the “desktop site” is not a easy task and will take some time and work. As a solution I am making a php/js main menu with back-links to the “desktop site” that integrate well in the iframe. With this solution not only a user can land in a “stand alone” application but also will be presented with other options.