htmliframeframeframeset

OK, html4 frames are "obsolete", but there does not look to be a way to replacement without re-writing your site completely. Or is there?


Have a look at my NUFOSMATIC site for viewing UFO Sightings from the National UFO Reporting Center. I put this together some 17 years ago (I'm sooooo old) using a simple-minded approach on a webserver provided by the ISP that did not have any way to serve anything more than HTML, Javascript, and Java applets. It does the job for me.

A couple of years ago (ok, 6 years ago) I was burned (along with everybody else) by the mess that Oracle made of Java. I spent a little time migrating the site's features from Java applets and my primitive maps from publicly available data to OpenLayers and OpenStreetMap. Very kuel. Got some new stuff out of it, but I lost a few things, too.

I've recently been upgrading the maps to OpenLayers 6. My original implementation was OpenLayers 2, and they managed to completely re-write the API with OpenLayers 3, and I finally found time to get my head wrapped around it and just do the work. Four days to migrate from ol2 to ol6! And I actually got back some of the functionality I had with Java applets.

So before I deploy I'm looking for other things I might... modernize... in the code. I find now that frameset/frame is "obsolete" - I also find that there is NOTHING in HTML5 that works like frameset/frame.

Note most of the site I've looked at say "obsolete" and NOT "deprecated" - it sounds like something that gonna disappear just as soon as they think nobody's looking...

Basically, I have four frames: the "corner", the "header", the "menubar", and the "main". As you move from one site feature to another, managed from the "menubar", the HTML in the "main" frame is replaced. The single page gives a place to save some session-global values (like which year and month you're looking at).

<frameset rows="80,*" frameborder="no" border="0" framespacing="0">
  <frameset cols="100,*" frameborder="no" border="0" framespacing="0">
    <frame name="cornerFrame" src="../html/cornerFrame.html" scrolling=no frameborder=0>
    <frame name="headerFrame" src="../html/headerFrame.html" scrolling=no frameborder=0>
  </frameset>
  <frameset cols="100,*" frameborder="no" border="0" framespacing="0">
    <frame name="menubarFrame" src="../html/menubarFrame.html" scrolling=no frameborder=0>
    <frame name="mainFrame" src="../html/mainFrame.html" scrolling=yes frameborder=0>
  </frameset>
</frameset>

This allows me to modularize my HTML (Sighings, Sequence, Heatmap, and various informational pages) where changing one does not screw up all of the others.

I've found dozens of sites with half-solutions, incomplete solutions, non-functional "solutions". ONE SOLID EXAMPLE IS WHAT I'M LOOKING FOR.

The solutions offered to replace frameset/frame would seem to be ghastly difficult to get up to speed on.

The iframe tag does not appear to be anything like frameset/frame, especially with the kind of nesting I have used here.

The suggestions to use CSS and the div tag to emulate frames is a non-starter because all of the code would have to be in one file, which is not possible.

There is the suggestion that a server-side solution is a choice using PHP to fabricate pages on the fly. OK, I've worked professionally in a dozen languages (even tried to work a port with Jovial code on a flight simulator), but learning a new language just to replace something that works seems like a waste of the few years I've got left.

Or just re-write the damned site, which I've already done twice. It's only 10K lines of code? How hard could it be? Except it takes time, and I'm old... OLD...

And I have to fix that cookie agreement thingie so that I don't get in Dutch with my friends in France...


Solution

  • We have prototyped a mapping from frameset/frame to iframe/div. It looks pretty good. Lots of references in these pages to places where we got help. We have now cranked these changes into the website and we are now frameset/frame FREE!

    http://nufosmatic.com/nufosmatic_prototype/iframe_div/

    ** We got a surprise posting it to the website this morning, but we will work through that also. Turned out to be a "margin" which should have been a "margin-left".