Live data from Hacker News

Entire website in a single HTML file

css-tricks.com

11–20 of 333 posts

Re: Entire website in a single HTML file

#16
Haha. This reminds me of the dot com days. I was doing the front end as a mammoth servlet. The entire UI was more or less in one multi megabyte Java file. The architect of our group started add in changes - which, briefly, I kept my nose above water editing - but he knew I'd drowned. When I finally gave up he went over JSPs and the new fangled 'MVC' pattern and really worked through some UI patterns with me. It was very much a learning moment for me for design and maintenance.

Re: Entire website in a single HTML file

#18
post #11

Using url fragments seems to limit how well Google can index it. site:john-doe.neocities.org in a google search only finds the main page and dist page.

This is like a chicken and an egg problem.

Google likely haven't designed their indexer to handle pages like this because not many people do it.

Many people don't do it, because Google won't index it properly.

Re: Entire website in a single HTML file

#19
post #3

How is this news? React SPAs have been around for years, and SPAs existed long before React too.

No, not a SPA.

There is a concept of a single file app (SFA). You can share an html file, and that is the application.

It can have inlined micro js/css frameworks, or hand-rolled everything. An SFA should be human readable though- viewing the page source is useful.

I think it’s a concept worth exploring.

Re: Entire website in a single HTML file

#20
post #8

This is something I've always wanted for virtual textbooks. A single .html file with all the JS, CSS, images as inline data blobs, etc. For most physics, math, CS, etc books, this should be possible. It would make it trivial to download the book for offline use and share it with others. Other than the raster images, the entire content of these types of books would probably fit in a couple MB of text. The use of #anch…

You're describing PDF files, but unfortunately Adobe didn't invest much time or money into making them interactive with a scripting language.
Post reply on HN