upvote
I used to do this in the early 2000s! Some folks back then would ask whether i was afraid that clicking a link (which loads a "new" web page) would slow things down and create an awful experience for users...but, my team and I would really focus on keeping web pages slim/lightweight to begin with...so it rarely was a problem. I don't think we were geniuses or anything like that, but keeping things light (always and from the beginning) enabled us to "cheat" (like this "hack" of the links in the column headers) in ways that were beneficial but with very low risk. Sometimes it took an extra moment or two at the beginning of an effort...but it ALWAYS paid off down the road, and in many different ways.
reply
It still works exceptionally well in 2026 and generally creates better and faster experiences than an SPA with far, far less code.
reply
You don’t need an SPA for that; Wikipedia has client-side sorted tables for example.
reply
I hate what it does to my back button
reply
HTMX is the solution
reply
So instead of using JS to sort the table directly, now you make a JS fetch() request to sort the table?!

It does make sense in one situation, if the table is a large server-side paginated one and the sorting is really an ORDER BY clause. But for a basic table that fits entirely on the client, it doesn't make sense at all. There are tiny JS libraries that will make <table>s sortable when you add a particular class name.

reply
Trading one javascript for another?
reply
I want tables that can be sorted on multiple columns without triggering a page refresh on every click.
reply
View Transitions are your friend
reply