1

I am writing a complex tab based web application where each tab is unrelated to each other in the sense that there is no interaction. So for ease of development i want I want each tab to be a separate html page viewable on its own and at later stage I can assemble them via tabs or may be menus or trees so question or questions are:

  1. I am planning to use iframes, does all major browser support them?
  2. Are iframes going to be deprecated, so what are alternatives e.g. is object tag supported by all major browsers?
  3. May be i can use some better strategy instead of iframe/object?

But what I love about iframes is that it can be totally modular, so each page doesn't know about other.

Note: i selected the answer which explain well but still i am not sure why not iframes question iframes vs ajax may answer that.

5 Answers 5

2
  1. Yes, all major desktop browsers support iframes. So do many mobile browsers, including IEMobile, Opera Mobile, and Safari on the iPhone. The only major browser I know of that doesn't support iframes is the BlackBerry Browser.

  2. The object tag is supported by most browsers, but the implementation is extremely inconsistent across the various browsers.

  3. What's wrong with just having a flat page with an ordinary navigation menu? If you are only displaying one page at a time, and the only interface element being placed outside of the iframe is a tab menu, then why not just integrate the tabs into the page layout and do away with the frames?

    Frames of any sort tend to break the familiar browser behaviors that people are used--like the forward and back navigation buttons. And they completely disable the use of bookmarks. When building a website, you should try not to restrict or dictate to visitors how they're allowed to browse your site. If the user wants to open a link a new tab, they should not be left without a navigation menu. If they make their browser window a particular size, the page content should fill that area, not a predetermined area specified by the dimensions of the iframe.

    Frames are inherently user-unfriendly, which, unsurprisingly, makes them search-engine-unfriendly; which is why so few professional websites use frames/iframes. Cheap broadband is widespread enough these days that reloading a few extra kilobytes of navigational data makes no difference to the overall user experience.

7
  • i agree but a) having navigational items in each page would not be ajaxian i.e. open tab without page reload b) as i said i may want to have each page to be seprate , so tosome users i can club few pages for some more, obviously that can be part of navigational item logic but that things get complex Apr 16, 2009 at 7:18
  • I've developed quite a few web applications w/ AJAX interfaces, and I've never needed to use iframes. Loading/reloading a page in an iframe is not really AJAX. With AJAX you should be able to update the interface of an already loaded document without loading a new page.
    – Calvin
    Apr 16, 2009 at 7:49
  • Depending on the content you are displaying, you can just use actual AJAX (XmlHttpRequest) to pull data from the server, process it client-side with JavaScript, and display it insides of a Div element or a dynamically created interface.
    – Calvin
    Apr 16, 2009 at 7:53
  • yes i understand what you mean, but basically what I want is load a complex page in tab, now how that will be accomplished with iframes and using navigational items? Apr 16, 2009 at 7:54
  • and my complex page inside tab can have further tabs, I know it can be accomplished with javascript/ajax but easier solution looks iframes Apr 16, 2009 at 7:55
1

If I were you, I would use jQuery UI Tabs instead of my own solution.

2
  • I will be using jQuery UI tabs but will they allow me to load any page using ajax, I created a page with two jquery tabs and than in each tab inserted same page, it did not show me the tabs inside those tabs i think somehow such loaded page are not really loaded like iframes? Apr 16, 2009 at 7:16
  • I'm in the site now since wednesday, so I'm sorry for not answering you. Well, no, tab content loaded with ajax is not loaded into iframes, it is loaded into divs instead. I think you really don't want to load into iframes, some reasons were exposed in Calvin post.
    – eKek0
    Apr 18, 2009 at 12:55
0

it looks like your website is not static, so i don't see why you're doing it with bare HTML.

I'd use ASP.NET and CustomUserControl as each of your tabs, that they all the tab would be truly independent and you can reuse them anywhere in your application

0

For the separate pages in each tab, you can as well use server includes.

0

To answer your first 2 questions:

  1. iframe is supported across all the latest web browsers however i am not sure about mobile browsers. Opera mobile yes, dont now about iPhone.

  2. the next major iteration of html is being led by WHATWG and the iFrame will be supported. It is also supported in xhtml

As far as different approaches, that very much depends on what you are going to be doing with the tabs. if each tab is going to have a lot of information on it or take a while to load then separate iFrames is probably best. Also, if you are going to reuse the code as independent pages else where then iFrames are also a good option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.