3 ms·
> If, instead of a big inscrutable blob of HTML/JS/CSS, Amazon gave me the same shaped data for a product listing as Ebay does, then as a user I would have a lo
by cxr 5y ago
> If, instead of a big inscrutable blob of HTML/JS/CSS, Amazon gave me the same shaped data for a product listing as Ebay does, then as a user I would have a lot more power over how my browser represents any generic product listing
That would certainly be ideal, but uniformity is not a prerequisite for more powerful, user-serving interfaces.
It doesn't always take special intent on the part of the site operator to end up providing a rich source of data; many sites end up doing it by accident. This is what's so great about HTML's class attribute. People often mistakenly think of classes as inherently having something to do with CSS. CSS is a carrot that often results in developers being encouraged to mark things up whether they buy in to the semantic argument or not[1].
Take a look at the video listings on pbs.org for an example of rich structure that can be readily mined by the UA. What's lacking is a generic tool that sits at about the same place as Excel on the power/expression spectrum and which allows the user to create and "train" an adapter (in a matter of seconds) for an arbitrary Web property. For example, given a list of videos and associated details (title, thumbnail, description, length, etc), point to two or more titles and your UA can, in an ML-free way, use those samples to examine the structure to create an adapter. To really make things tighten it up to an acceptable margin, it can even provide an editor that exposes the raw class names as UI so you can explicitly reconfigure the model as you please. This is a system that would not take an expert to use, at least not any more than the "expertise" that is required to recognize that, say, the table widgets in many apps allow you to sort data or rearrange/resize columns via drag and drop.
1. It's not perfect, because you have garbage-out fads that can come along and knee you in the stomach, like Tailwind CSS and compilers that generate meaningless class names, but there are short-term and long-term mitigations.