Hacker News new | ask | show | jobs
by uniqueid 2178 days ago
I've come to believe that, in retrospect, 'AJAX' was a mistake. For the first decade of the web, nearly all its functionality was implemented using HTML tags.

What roles does the web serve that benefit humanity? Some of the most important are: 'literary', 'research', 'educational', 'financial service', 'commercial service', 'audio/video'.

Then we have a 'typesetting/graphic-design' role, which is 99% of the reason the web 'requires' JS and CSS. As long as we were happy with a "one-size-fits-all" design, we could enable the other roles via (existing, and future) HTML tags alone (the way we did prior to the introduction of JS).

Now, what are the trade-offs we make to gain the 'typesetting/graphic-design' role? They are a loss of: security, privacy, legibility, compatibility, accessibility, ease-of-use, and page load speed. To be fair, we also gain fantastic abilities for web developers to innovate, but we could probably find some workaround, without 'AJAX', to allow devs to experiment.

The world would be better off, in may ways, if we scrapped the web's dynamic features, created a few new HTML tags, and re-implemented them using HTML alone.

3 comments

There is absolutely no reason great typography should come at the expense of privacy, unless you are unable to upload custom fonts or have something against CSS.

You also don't need JS to support it, although you may have to give up on the idea that your site has to look the same in all browsers, because not all browsers can do things like automatic hyphenation.

And frankly I am happy that I don't have to read source code in Courier just because it is the only available monospace font.

    > There is absolutely no reason great 
    > typography should come at the expense of privacy
I agree to the extent that there is an order of magnitude less reason to prohibit CSS than Javascript.

However CSS is not benign. There are features that bad actors regularly exploit. For example, setting the opacity of an evil button to 0, and positioning it above an innocent button.

Also, CSS, as currently designed, is a barrier to reuse. The model I like is one where users are at liberty to display web content however they (the user, not the website) prefer. Since CSS is basically reusable only in theory, it inhibits that.

    > I am happy that I don't have to read source code in 
    > Courier just because it is the only available monospace font. 
It's true that, as a web developer, you can provide Courier. As a user, it's not, by browser default, your choice whether you get Courier. If the server decides a user should see Comic Sans, that's what the client will use, no?
CSS is literally designed so that you can override previous definitions by loading your own stylesheet. Thats not just the standard, it is in the name (Cascading Style Sheet). The fact that no main-stream browser supports adding user specific styles out of the box is an issue with the browsers not acting as the user agents they are supposed to be and not really CSS.
CSS is reusable in some ways, but not in the sense that you can take a stylesheet from one site, apply it to another, and have a guarantee that the result will make sense.

This is partly because HTML has its own competing presentation features, and partly because there is an infinite number of cases for which a designer would have to write rules (eg: many html elements, that can also be nested)

CSS is sucky for large projects, but it's enabled truly beautiful sites. JS on the other hand...
I agree completely. Without CSS the web would be much more boring and visually dull.

The point I wanted to make with my comment is that the dullness also has advantages.

No doubt! I regularly use Reader view in browsers, Instapaper, and RSS readers to escape the ad strewn hellscape we've created online.
Yes, let's reinvigorate AOL! Disrupt the internet!
It's the internet today that feels like AOL: a great mass of ignoramuses, posting nonsense at each other on some proprietary web property.

I want an internet that helps to enlighten society, not mainly induces it to pump out memes, insults and prank videos.