← Back to context

Comment by ozim

9 hours ago

AJAX and updating DOM wasn't there just to "make things faster" it was implemented there to change paradigm of "web sites" or "web documents" — because web was for displaying documents. Full page reload makes sense if you are working in a document paradigm.

It works well here on HN for example as it is quite simple.

There are a lot of other examples where people most likely should do a simple website instead of using JS framework.

But "we could all go back to full page reloads" is not true, as there really are proper "web applications" out there for which full page reloads would be a terrible UX.

To summarize there are:

"websites", "web documents", "web forms" that mostly could get away with full page reloads

"web applications" that need complex stuff presented and manipulated while full page reload would not be a good solution

Yes, of course for web applications you can't do full page reload (you weren't either back in the days, where web applications existed in form of java applets or flash content).

Let's face it, most uses of JS frameworks are for blogs or things that with full page reload you not even notice: nowadays browsers are advanced and only redraw the screen when finished loading the content, meaning that they would out of the box mostly do what React does (only render DOM elements who are changes), meaning that a page reload with a page that only changes one button at UI level does not result in a flicker or loading of the whole page.

BTW, even React now is suggesting people to run the code server-side if it is possible (it's the default of Next.JS), since it makes the project easier to maintain, debug, test, as well as get better score in SEO from search engines.

I'm still a fan of the "old" MVC models of classical frameworks such as Laravel, Django, Rails, etc. to me make overall projects that are easier to maintain for the fact that all code runs in the backend (except maybe some jQuery animation client side), model is well separated from the view, there is no API to maintain, etc.

> full page reloads

grug remember ancestor used frames

then UX shaman said frame bad all sour faced frame ugly they said, multiple scrollbar bad

then 20 years later people use fancy js to emulate frames grug remember ancestor was right

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

  • Classic frames were quite bad. Every frame on a page was a separate, independent, coequal instance of the browser engine. This is almost never what you actually want. The header/footer/sidebar frames are subordinate and should not navigate freely. Bookmarks should return me to the frameset state as I left it, not the default for that URL. History should contain the frameset state I saw, not separate entries for each individual frame.

    Even with these problems, classic frames might have been salvageable, but nobody bothered to fix them.

    • > Every frame on a page was a separate, independent, coequal instance of the browser engine. This is almost never what you actually want.

      Most frames are used for menu, navigation, frame for data, frame for additional information of data. And they are great for that. I don't think that frames are different instances of the browser engine(?) but that doesn't matter the slightest(?). They are fast and lightweight.

      > The header/footer/sidebar frames are subordinate and should not navigate freely.

      They have the ability to navigate freely but obviously they don't do that, they navigate different frames.

      13 replies →

    • You can see frames in action on the POSIX spec:

      https://pubs.opengroup.org/onlinepubs/9799919799/

      They can navigate targeting any other frame. For example, clicking "System Interfaces" updates the bottom-left navigation menu, while keeping the state of the main document frame.

      It's quite simple, just uses the `target` attribute (target=blank remains popular as a vestigial limb of this whole approach).

      This also worked with multiple windows (yes, there were multi-window websites that could present interactions that handled multiple windows).

      The popular iframe is sort of salvaged from frame tech, it is still used extensively and not deprecatred.

      1 reply →