Live data from Hacker News

Entire website in a single HTML file

css-tricks.com

231–240 of 333 posts

Re: Entire website in a single HTML file

#231
post #215

Earlier quoted context omitted.

The reason is that trolls like to post links to shock sites or a google search for something terrible. Even worse, you could get rickrolled.

Some day we will have native browser support for the full URL showing in the status field.

Oh no cried the scammers, how will we ever again trick people into clicking a link

Re: Entire website in a single HTML file

#233

Earlier quoted context omitted.

Depends of what a website is for you.

The same it is for everyone since the beginning of WWW: a static page with images. The web is uniquely unsuitable for anything else.

This is a very old fashioned point of view I’m afraid, things have moved on.

Re: Entire website in a single HTML file

#234
post #42

Anyone here absolutely godsmacked that this is the top news on HN? The hell happened? Did I get cryogenically frozen and just woke up?

Yeah I don't know what just happened. I came to the comments to see if I was missing something but no, that's it. Weird.

Re: Entire website in a single HTML file

#235

So to sum what I'm reading, it's a neat little demonstration of the :target pseudoclass. But: - No, the entire website isn't a single HTML file (it's also images and a CSS file) - So no, you can't download a single file and have it work offline - And no, this won't work well with screenreaders and other non-standard clients - And no, this doesn't scale well to larger sites - And no, this won't be indexed well by sear…

All fair points in many contexts, but not all contexts. Some counters:

1. You can embed CSS easily, and images using data: URIs...

2. ... so you can download the whole thing as a single and work offline.²

3. Non-standard clients are not my problem, file under “you can't please everyone, especially those who chose to be difficult to please!”. Accessibility is a concern though, I'd need to look into that before using such techniques without a reliable fallback.

4. This isn't practical for sites/pages needing large resources like high-res images, or that are large generally¹, but not all sites/pages need large resources or are large in general.

5. Not everything needs to be indexed well by search engines, I have things out there that are only relevant to those I refer to them, though I agree this could be a significant issue for many.

6. True. Though that breaks your second point, so you need to choose.

----

[1] you wouldn't want wikipedia done this way!

[2] also with external resources almost all browsers will happily save then when you do file|save, and to be pedantic the description given is “in a single html file” not “in a single file”

Re: Entire website in a single HTML file

#236

Earlier quoted context omitted.

The problem with PDF's has always been the layman can't create them without some expensive Adobe program.

macOS hasn’t had this problem in 20 years.

Yes, it's literally just Print dialogue -> Save as pdf.

Also worth noting that the PDF preview on the Mac has very nice simple editing capabilities to combine pages, delete pages, crop etc.

Re: Entire website in a single HTML file

#238

So to sum what I'm reading, it's a neat little demonstration of the :target pseudoclass. But: - No, the entire website isn't a single HTML file (it's also images and a CSS file) - So no, you can't download a single file and have it work offline - And no, this won't work well with screenreaders and other non-standard clients - And no, this doesn't scale well to larger sites - And no, this won't be indexed well by sear…

I see no problem for SEO. I see no problem for screenreaders

This is all classic and supported HTML, so those should work perfectly for this.

Re: Entire website in a single HTML file

#239
post #225

Earlier quoted context omitted.

May I ask how to create a Mathematics Stack Exchange clone without JS?

What part of a Mathematics Stack Exchange clone would require JS?

In "modern" stacks it is preferable to do things like layouting of formulas millions of times on the clients, instead of once on the server. I guess that sort of thing needs JS.

Re: Entire website in a single HTML file

#240

This is great. I just wish this clumsy wording was a bit tighter: > the whole website is contained within a single HTML file. Because, it's not. An HTML file, a CSS file, and some PNGs. What's interesting is there is no JavaScript.

It's not, but with a little more imagination you could certainly take the author's work to the next level. Inline CSS and images as blobs.

Then in practice the issue becomes a bloated file that isn't able to reuse internal components, at least not without introducing a layer of complexity such as a scripting language and browser APIs to go with it.

Perhaps if HTML had been designed with more component re-usability in mind, the landscape of the internet would look very different today. Then again, what sense would there be in having a single HTML file for a site like Wikipedia or Altavista? And imagining the web evolving without a scripting language would be naive.

Single file websites that could be served up on blob or network storage certainly appeal to me, especially today.

Post reply on HN