A lot of popular websites these days use client-side navigation. Instead of the browser clearing everything and loading the page normally, a site with client-side navigation uses JavaScript to fetch the requested page and dynamically change the DOM without a browser reload.
If you navigate around the forum, for example, you’ll see that it has its own loading bar at the top of the page and the normal browser loading indicators are not used.
Do you think this is a nice quality-of-life feature or does it seem like unnecessary complexity? Or perhaps something else? Have you noticed it before?
I would only implement client-side navigation under economic duress, by which I mean I would only do so if refusal meant losing my job. Core functionality, such as navigation, is too important to be left to the client or implemented in JavaScript, because JavaScript isn’t always available. A script might go missing, or fail to download on a flaky connection, or be blocked by anti-malware extensions.
However, my preference is not a prescription. Others should do what they want with their websites.
For something that’s meant to be interactive, I could see the benefit. For something like a personal site, it seems more like overkill. Sure, it moves content without a browser refresh, but how much overhead was added? Does it make the process better in any way? Would it just be easier to make the same thing in HTML?
As long as it doesn’t break page history and still has a URL to link to the specific page, I don’t see the harm. It would also be nice if caching behavior is maintained but we can’t always have everything we want.
It really depends on what you’re doing and how it behaves. A social media web application? Might be fine to do that for depending on the feel you’re going for. I don’t mind it here or on Wafrn. But a browser game I played for a while uses it and it didn’t preserve scroll or history (fully reloading with a little loading circle on every page refresh or accidental back button, resetting any interactions you did if you didn’t fully complete them), which drove me crazy. It was part of what led me to stop playing it.
If you’re making a blog, creating an art gallery, or making a repository of your stories, why would you ever want that when plain HTML is so much easier?
The server is a controlled environment. The client is not. The more you put on the client, the more chance something unexpected might happen.
i hate it tbh, it always feels sluggish and ruins nice features like middle click to open in new window, i usually use noscript so its also frusting in that way
If a site requires JS for something as simple as navigation, I leave the page and don’t return. I do make some exceptions to that rule here and there if I really value the site in question.