← Back to context

Comment by kbolino

15 hours ago

With a frameset page:

History doesn't work right

Bookmarks don't work right -- this applies to link sharing and incoming links too

Back button doesn't work right

The concept is good. The implementation is bad.

Yup, they are not enough for an SPA, not without javascript. And if you have javascript to handle history, URL, bookmarks and all that, you can just use divs without frames.

  • This has nothing to do with SPAs.

    Take the POSIX specs linked in a sibling comment.

    Or take the classic Javadocs. I am currently looking at the docs for java.util.ArrayList. Here's a link to it from my browser's URL bar: https://docs.oracle.com/javase/8/docs/api/

    But you didn't go to the docs for java.util.ArrayList, you went to the starting page. Ok, fine, I'll link you directly to the ArrayList docs, for which I had to "view frame source" and grab the URL: https://docs.oracle.com/javase/8/docs/api/java/util/ArrayLis...

    Ok, but now you don't see any of the other frames, do you? And I had one of those frames pointing at the java.util class. So none of these links show you what I saw.

    And if I look in my history, there is no entry that corresponds to what I actually saw. There are separate entries for each frame, but none of them load the frameset page with the correct state.

    These are strongly hyperlinked reference documents. Classic use of HTML. No JavaScript or even CSS needed.

    • This is exactly what I wrote? But let me rephrase it: frames are not enough solely for an SPA, they can't keep state, you need javascript/dynamic webserver for that.

      > Ok, fine, I'll link you directly to the ArrayList docs, for which I had to "view frame source" and grab the URL:

      You could've just right click on the "frames" link, and copy the URL: https://docs.oracle.com/javase/8/docs/api/index.html?java/ut... . They use javascript to navigate based on the search params in the URL. It's not great, it should update the URL as you navigate, maybe you can send them a PR for that. (And to change state of the boxes on the left too.)

      Also browser history handling is really messy and hard to get right, regardless of frames.

      > And if I look in my history, there is no entry that corresponds to what I actually saw.

      ? If you write a javascript +1 button that updates a counter, there won't be a corresponding entry in your history for the actual states of your counter. I don't see how that is a fundamental problem with javascript(?).

      2 replies →

> History doesn't work right

> Bookmarks don't work right -- this applies to link sharing and incoming links too

> Back button doesn't work right

Statements that apply to many JS webpages too.

pushState/popState came years after frames lost popularity. These issues are not related to their downfall.

Relax, dude. I'm not claiming we should use frames today. I'm saying they were simple good tools for the time.

  • They were never good. They were always broken in these ways. For some sites, it wasn't a big deal, because the only link that ever mattered was the main link. But a lot of places that used frames were like the POSIX specs or Javadocs, and they sucked for anything other than immediate, personal use. They were not deprecated because designers hated scrollbars (they do hate them, and that sucks too, but it's beside the point).

    And, ironically, the best way to fix these problems with frames is to use JavaScript.

    • > They were never good

      They were good enough.

      > For some sites, it wasn't a big deal

      Precisely my point.

      > POSIX specs or Javadocs

      Hey, they work for me.

      > the best way to fix these problems with frames is to use JavaScript.

      Some small amounts of javascript. Mainly, proxy the state for the main frame to the address bar. No need for virtual dom, babel, react, etc.

      --

      _Again_, you're arguing like I'm defending frames for use today. That's not what I'm doing.

      Many websites follow a "left navigation, center content" overall layout, in which the navigation stays somehow stationary and the content is updated. Frames were broken, but were in the right direction. You're nitpicking on the ways they were broken instead of seeing the big picture.

      5 replies →