"Or, suppose a company makes a webpage for looking up products by their model number. If this page were made in 2005, it would probably be a single PHP page. It doesn't need a framework - it's one SELECT query, that's it. If this page were made in 2022, a conundrum will be faced: the company probably chose to use a statically generated website. The total number of products isn't too large, so instead their developers stuff a gigantic JSON file of model numbers for every product made by the company on the website and add some client-side JavaScript to download and query it.... This example is fictitious but I believe it to be representative."
As an end user, I have seen this perplexing design pattern quite often. As soon as I see it, I just get the URL for the JSON file and I never look at the web page again.
It is like there is so much bandwidth, memory and CPU available but the developer is not letting the user takes advantage of it. Instead the developer is usurping it for themselves. Maybe a user wants to download data. But the developer wants to run Javascript and keep _all_ users staring at a web page.
Why not just provide a hyperlink on the rendered search results page pointing to the JSON file, as an alternative to (not a replacement for) running Javascript. What are the reasons for not provding it.
On some US government websites, for example, a hyperlink for the the CSV/JSON file is provided in the rendered search results page.^1
That is why a non-commercial www is so useful, IMHO: the best non-commercial websites do not try to "hide the ball".
Perhaps they have no incentive to try to force users to enable Javascript, which is a practical prerequisite for advertising and tracking.
1. ecfr.gov and federalregister.gov are two examples
As an end user, I have seen this perplexing design pattern quite often. As soon as I see it, I just get the URL for the JSON file and I never look at the web page again. It is like there is so much bandwidth, memory and CPU available but the developer is not letting the user takes advantage of it. Instead the developer is usurping it for themselves. Maybe a user wants to download data. But the developer wants to run Javascript and keep _all_ users staring at a web page.
Why not just provide a hyperlink on the rendered search results page pointing to the JSON file, as an alternative to (not a replacement for) running Javascript. What are the reasons for not provding it.
On some US government websites, for example, a hyperlink for the the CSV/JSON file is provided in the rendered search results page.^1
That is why a non-commercial www is so useful, IMHO: the best non-commercial websites do not try to "hide the ball".
Perhaps they have no incentive to try to force users to enable Javascript, which is a practical prerequisite for advertising and tracking.
1. ecfr.gov and federalregister.gov are two examples