2

i heard alot of people hate "frames" and "iframes" to link to a specific page, are these still needed todays websites? example, http://www.sportsmanager.us/orgmanager/NHYLA.htm these are iframes, is there any better solution then "iframes"? whats the most common used these days? still frames? do people still use frames like this?

<frameset cols="85%, 15%">
  <frame src="URL OF FRAME PAGE 1 HERE" name="frame_1">
  <frame src="URL OF FRAME PAGE 2 HERE" name="frame_2">
  <noframes>
    Text to be displayed in browsers that do not support frames
  </noframes>
</frameset>

or any better alternatives?

3
  • frames and framesets are completely obsolete in HTML5. iframes got considerable attention, and IMHO, aren't as bad as people think they are - programmers.stackexchange.com/questions/144515/… Aug 28, 2014 at 17:27
  • It will depend a lot on what are you trying to achieve... But, framesets are no longer used... iframes, on the other hand, are still widely used...
    – LcSalazar
    Aug 28, 2014 at 17:27
  • I use 'em all the time, together with tables for the layout. I don't like all that modern stuff like HTML5 and SeeSS or whatever it's called. ;-) Aug 29, 2014 at 19:09

5 Answers 5

4
  • are these still needed todays websites?
    No, they're not needed. Though browsers still support it.

  • is there any better solution then "iframes?
    I wouldn't say "better", but there are alternatives... In HTML 5 you have some approaches. See Alternative to iFrames with HTML5

  • Whats the most common used these days?
    I believe most people still go to iframe, but never saw any research on that...

  • still frames? do people still use frames like this?
    No. Most developers (if not all) abandoned frameset's a long time ago...

Really it's all just a matter of what are you trying to achieve, though is considered "always better" to seek the latest techonogies.... (for example HTML5)

1

Frames are not used very often today. One problem is, that navigating in an frame will not change the URL. So users can not link to specific pages. Iframes are used on many websites to embed third party tools like the facebook button.

2
  • 1
    so whats the best way to use frames then? dont use them? or rather whats the better alternative to storage the webpages and use the links for it? Aug 28, 2014 at 17:30
  • 1
    The best way is not to use them ;-) Nearly every webspace provider allows you to use PHP, so you can include the contents of other files based on URL parameters and don't have to insert the code for your header or footer on every page. But this is only one possibility. You can use other server-side scripting languages or even client side scripts like JavaScript to generate your pages.
    – Tobias K.
    Aug 28, 2014 at 17:35
0

The main aim of frames to separate pages into different blocks, so that would enable you to update parts of your page when needed. Also it enables you to include third party pages, widgets... They are no longer used, and its better to avoid their use since there is a better way of achieving same thing. The short answer would be AJAX...

0

Frames are brilliant in my view, yes there are weaknesses but for navigating around and not having to reload a menu each time, you can't beat 'em. Their demise was due to other technologies not being able to handle them. It was pressure from outside that saw them off. That's a shame, AJAX and CSS make a stab at replacing them but they are not as good.

-1

The reason frames are used is to maintain a certain template to the website, the reason why there is hate is because you can't keep the browser history once you navigate through the site. So if you wanted to bookmark the page or send a link to that page to someone else, they wouldn't see what you are seeing.

You should use a framework for developing a site if you want to keep a certain template. Look into Content Management Systems (CMS) such as Wordpress, or in simple PHP

index.php:

<?php
include('header.php');

    your content here

include('footer.php');
?>

header.php:

<?php

    <html>
    <head><title>Title</title></head>
    <body>
    <div id="header"><h1>header content</h1></div>
    <div id="sidebar">
        <span>sidebar content</span>
    </div>
?>

footer.php:

<?php

    </body>
    </html>

?>

And then you would need to add styling to make it look like a header and sidebar

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