Anyone here absolutely godsmacked that this is the top news on HN? The hell happened? Did I get cryogenically frozen and just woke up?
Entire website in a single HTML file
71–80 of 333 posts
Re: Entire website in a single HTML file
#72Earlier quoted context omitted.
Been doing this for over half a decade off of a template I boosted 8 years ago and have been modifying since. Has made tens of millions in revenue. Just assumed every developer or template seller in south asia was using this - or their clients. Probably more common than you think.
So you are using a single HTML file with no JS at all to deliver a multi-page site? Just to be clear.
Re: Entire website in a single HTML file
#73This 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.
Yes, they did. (Non-Adobe readers often don't support JS, though some do, but Adobe definitely built the support for interactivity.)
Also 3D content and a lot of other things most people probably aren't aware of, because they are peripheral to the common use cases of PDF.
Re: Entire website in a single HTML file
#74Re: Entire website in a single HTML file
#75Earlier quoted context omitted.
I wouldn't call that a limitation. In fact that is one of the major selling points of the PDF format. The document looks as intended* by the creator on all platforms whether display or print media. * Yes, I know, PDF doesn't -always- do this, but a well designed PDF generally does.
It is a limitation. Anyone who's ever tried to read a PDF journal article on their phone has experienced it. (and don't even get me started on Unicode copy/paste...) HTML can be styled in a fixed layout if desired, and reflowed by a reader mode if needed. PDF can't be styled in a responsive way, and there's no (easily accessible) reader mode equivalent for PDFs. HTML is a far better document format than PDF.
It’s called Liquid Mode in Reader, and it is, in fact, easily accessible.
> HTML is a far better document format than PDF.
HTML is better for some things, PDF for others. That's why PDF is widely used on the web when HTML is available.
Re: Entire website in a single HTML file
#76Re: Entire website in a single HTML file
#771. https://github.com/cadars/portable-php 2. https://news.ycombinator.com/item?id=25770516
Re: Entire website in a single HTML file
#78Using 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.
Re: Entire website in a single HTML file
#79This 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…
Re: Entire website in a single HTML file
#80Earlier quoted context omitted.
So you are using a single HTML file with no JS at all to deliver a multi-page site? Just to be clear.
To be clear, yes. With the section tag. Sometimes I even add javascript to the style section without any object orientation. Stop the presses.
If you already knew about this, the post seems like a joke, you've made millions off this for years now--that's really special, but that is also pretty subjective and doesn't mean it's not meaningful that one of the top CSS sites shared this article out this year.