Live data from Hacker News

Entire website in a single HTML file

css-tricks.com

221–230 of 333 posts

Re: Entire website in a single HTML file

#221

Earlier quoted context omitted.

On HN it makes sense to me, because a long link would interrupt the flow of text. So you do a footnote to make them go out of the way. Otherwise Wikipedia has a happy medium I think; footnotes are on the bottom where you'd expect, but they show on hover so you don't have to jump there and then back.

If only the Web had a way to make text clickable withtout showing the whole target URL.

There must be other reasons, if it doesn't make sense technologically, no? Instagram also has the tech to show more than 3 images in a row, and Twitter could allow longer texts if they wanted so.

Re: Entire website in a single HTML file

#222
post #41

This looks like one of those sites I made as a kid. What is the significance of this?

Well, there is an audience which likes to avoid websites with JS. I think their biggest motivation is tracking and bloat. So having a technique for a user experience without load times (after the initial load) without JS is what makes this somewhat special.

On the other hand, there have been solutions for this case for ages (like using radio buttons), so using :target is just a somewhat cleaner approach from my point of view.

Re: Entire website in a single HTML file

#223

Well, TiddlyWiki[1] has been going it for 17(!) years. It's a very mature, polished, and extensible engine for wikis, blogs, and personal knwledge bases. The entire thing (including the editor!) is a single .html file. By default, even images are embedded. For my ADHD Wiki[2], a resource that talks about ADHD with a copious amounts of relatable memes intertwined with the text, I chose to just use images in the same d…

Yes, TiddlyWiki is great, but isn't it full of JS? I mean, the somewhat special thing here, is that the page is built without JS.

Re: Entire website in a single HTML file

#224
post #91
post #84

HTML and CSS alone are really powerful. I decided not to use any JS on my personal site, but you can still have: + collapsible sections with `details` and `summary`[0] + footnotes, with navigation to/from with anchor tags. You can even apply CSS on the currently selected footnote.[1] + Semantic web that is compatible with everything and has sensible defaults so you can focus on what you're actually doing! + Tiny depl…

You like to live in hard mode. I like that.

Completely agree

Re: Entire website in a single HTML file

#226
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.

Re: Entire website in a single HTML file

#227
post #147

Earlier quoted context omitted.

Just embed both CSS files and images in the HTML file.

And now it's even less scalable to larger sites because you're forcing the eager loading of resources on pages you'll never click on.

If you are interested in building a single page site, I really doubt that scaling is an issue you'll have to contend with and seems like a waste to even consider it for something so small.

If you get hung up scaling a single page, you have other problems

Re: Entire website in a single HTML file

#228

Earlier quoted context omitted.

On HN it makes sense to me, because a long link would interrupt the flow of text. So you do a footnote to make them go out of the way. Otherwise Wikipedia has a happy medium I think; footnotes are on the bottom where you'd expect, but they show on hover so you don't have to jump there and then back.

If only the Web had a way to make text clickable withtout showing the whole target URL.

Sarcasm acknowledged

Hiding in the URL is a favorite feature for scams and pranks

Re: Entire website in a single HTML file

#229

Earlier quoted context omitted.

Hum... You may be thinking about a page being a file. A site is a collection of those.

A site is a website is the thing behind a domain name. Many were, and are, a single file. Its the rest of ya'll that are overcomplicating things and somehow perverted that to thinking its necessary. How many layers of meta are we right now for this article to be interesting?

I thought it funny just how many of your respondents decided to charge the semantic hill, completely missing the point.

But you know this doesn't use JS, right? (joking)

Re: Entire website in a single HTML file

#230

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.

A CSS file is unnecessary, and you could skip the images or embed them.
Post reply on HN