Live data from Hacker News

HTML is the Web

petelambert.com

101–110 of 341 posts

Re: HTML is the Web

#101
post #35

Earlier quoted context omitted.

> Even a long time ago when websites were static things rendered by the browser once and then left alone there was always a tree of nodes underlying everything ... yes ? the name of this "tree of nodes" is not "Document object model" for nothing.

I know. The problem with that name is people seem to stop reading after "Document".

Though the web is made of documents, not the objects within.

There's no native way to link to specific objects in the DOM that are not identified as part of the document through an ID; the anonymous objects in the DOM can only be accessed programmatically, URLs have no syntax to traverse the tree like there is an "#anchor" section for accessing chapters.

Re: HTML is the Web

#102
post #92
post #74

Earlier quoted context omitted.

The general web loved Flash for cases where you needed an application rather than a document. It wasn't appropriate for everything, and it was unfortunately very difficult to mix Flash with general HTML, but in many ways it was better than today's web for both creators and end users.

Second that. For the user, flash applets where super easy to block in general and to whitelist on pages where you wanted to use that particular flash application. Basically the same was true with Java. And for a certain extend JavaScript -- until the ugly DHTML menus arised and websites stopped to be usable without JavaScript. Nowadays there are only two options: Either you block JavaScript --- and percieve a 1995's…

The 1995 view is superior. It loads fast, doesn't hog CPU, never does anything unexpected, and has limited tracking capacity. I cringe whenever I browse without NoScript. If your pages can't render in my sandbox I just go somewhere more sensible.

Re: HTML is the Web

#103
post #54

Unpopular opinion... but I think this is a too limited view of the web. My contrary opinion is that the actually important feature of the web is the URL, and the important feature of the browser is that it provides a sandboxed platform for running untrusted code without a builtin "walled garden moral police". It would be nice if operating systems would be exactly that, but for some reason "commercial" OS vendors are…

Indeed, a browser should be just a sandbox, nothing more. All the HTML+CSS+JS stuff only makes browsers difficult to secure, and also causes bloat and performance issues when they are not needed. Furthermore, all these hairy web specifications cause compatibility issues, and are a barrier to entry for new browser makers. If people want HTML or CSS or JS, then they should implement these inside the sandbox. In practic…

Ok, but that isn't "the web."

You are completely free to write and launch a new app that does this today. Just don't try and shoehorn it into my web browser.

Re: HTML is the Web

#104

As an experiment, I started https://wordsandbuttons.online/ in plain hand-crafted HTML+CSS+JS (JS for the interactive bits only). Every page is self-sufficient, there are no dependencies, no dynamic data exchange, no HTML generators, - nothing. And it works so well, I don't really want any frameworks now. It's perfectly malleable - I can make every page do exactly what I want it to. It's lean and fast - every page ev…

It is truly astonishing how much people believe that they need frameworks. Your site looks nice, but one comment I'll make about your coding style is that you (or anyone getting inspired from your code) should probably switch away from innerHTML as the default choice for DOM modification. In a lot of otherwise useful contexts it is an HTML injection hole. (For the record it doesn't seem to be a security issue for the…

Good point! Thanks!

Re: HTML is the Web

#105
post #63

As an experiment, I started https://wordsandbuttons.online/ in plain hand-crafted HTML+CSS+JS (JS for the interactive bits only). Every page is self-sufficient, there are no dependencies, no dynamic data exchange, no HTML generators, - nothing. And it works so well, I don't really want any frameworks now. It's perfectly malleable - I can make every page do exactly what I want it to. It's lean and fast - every page ev…

When you're making a site like yours (which is awesome btw) hand-coding HTML and JS works fantastically. You don't need a framework. Frameworks only really start being useful when you're working at scale either across lots of data-driven pages or with multiple developers on the same product.

Yes, that's true. If you have lots of work to automate - sure, you need something to automate it.

Re: HTML is the Web

#106
post #71

Earlier quoted context omitted.

That view of the browser is what I want to have. It blows my mind that we still have to tell people “don’t click links in your email” because it’s still possible for something terrible to happen if they do.

> for something terrible to happen if they [click links in their email]. There are very few RCEs now on modern browser (they still exist[0,1], though). The main threat is phishing, because users are gullible (and should be educated). [0] https://www.mozilla.org/en-US/security/advisories/mfsa2019-1... [1] https://objective-see.com/blog/blog_0x43.html And: https://news.ycombinator.com/item?id=20283922

You don't need to exploit a browser when Adobe still can't fix the holes in Reader and corporate users are still heavily dependent on Outlook.

Re: HTML is the Web

#107
post #23

Earlier quoted context omitted.

That’s a very narrow view. Machine code is ran in one context – the CPU – with the compiler worrying about this one context. Meanwhile, HTML is parsed by much more than a browser. Like the article says, there is literally zero drawback to being slightly more semantic. In fact, semantic HTML probably improves your own code, making it easier at a glance to see what components do.

> Meanwhile, HTML is parsed by much more than a browser. Any examples?

Screen readers, braile readers, rss readers, search bots, voice assistants like Siri or Google Assistant, social media embeds....

Need more?

Future tech too. Who knows what's going to be consuming our content in the future, or what input and output devices we (or others) are going to be using to navigate content and apps.

Re: HTML is the Web

#108
post #78

Earlier quoted context omitted.

Opening can of worms: did you serve them with any of the available XML MIME types? If not they worked simply because of the bug in the browsers (SHORTTAG means a different thing in HTML compared to XML) and all XHTML code served with HTML MIME type would be littered with ">" if browser treated it right ;)

I once toyed with the idea of serving XHTML page as application/xhtml+xml, but the fact the browser (back then, not sure about now) will just display XHTML error and doesn't render anything was a deal breaker for me.

By "the browser" you mean "Internet Explorer". The only browser that couldn't handle XHTML.

Re: HTML is the Web

#109
It's kind of funny to think about how web was supposed to be extensible with 'type' attribute for script and style tags,but everyone forgot to implement anything other than 'text/css' and 'application/javascript'. Why did it happen?

Re: HTML is the Web

#110
post #77

Unpopular opinion... but I think this is a too limited view of the web. My contrary opinion is that the actually important feature of the web is the URL, and the important feature of the browser is that it provides a sandboxed platform for running untrusted code without a builtin "walled garden moral police". It would be nice if operating systems would be exactly that, but for some reason "commercial" OS vendors are…

I'm inclined to disagree, but I guess the real problem is that webpages on the internet are being forced to serve both purposes. Paradigm 1 - interconnected, hyperlinked web of text-and-content-based documents: open, accessible, amenable to indexing and tooling and so forth. Paradigm 2 - delivery vehicle for cross-platform, full-featured, somewhat-security-sandboxed, applications. I agree with the article that it's s…

Don't we kind of have Paradigm 2 on our smartphones and tablets? It's not perfect but it's something.
Post reply on HN