Earlier 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.
Entire website in a single HTML file
61–70 of 333 posts
Re: Entire website in a single HTML file
#62This 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.
Re: Entire website in a single HTML file
#63Normal websites used to be one file way back in the day. It was a "pro tip" to split out the JS & CSS into a separate files.
Put your script tags at the bottom of the html page so that when the JavaScript is executed all the dom elements on the page can be referenced. Either that or bootstrap in a window onload callback. I remember picking up and being in awe of secrets of the JavaScript ninja
You're maybe parallelizing things. As the client is downloading and interpreting the css and JavaScript, the server is doing database calls and rendering the HTML.
So you actually are doing things on the server side when you're "blocking"on the client. You didn't get this for free. You had to worry about buffers, flushing, and plenty of testing.
I don't know if you can still squeak an actual speed up with this technique (there's many attributes you can use to customize things these days) but I used to use it all the time back in the days of platter drives.
Re: Entire website in a single HTML file
#64This 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.
Re: Entire website in a single HTML file
#65This looks like one of those sites I made as a kid. What is the significance of this?
Nobody else is really doing this, or was doing this. But you can't tell that it's different, that's what's neat about it. It works just like a multi-page site but there's not even any JS requirement.
At one point we were able to create "interactive" content entirely in our heavily customized BBCode without a single line of JS, and this #target is one of the more used tricks.
Re: Entire website in a single HTML file
#66This 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
#67This looks like one of those sites I made as a kid. What is the significance of this?
Nobody else is really doing this, or was doing this. But you can't tell that it's different, that's what's neat about it. It works just like a multi-page site but there's not even any JS requirement.
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.
Re: Entire website in a single HTML file
#68Normal websites used to be one file way back in the day. It was a "pro tip" to split out the JS & CSS into a separate files.
Hum... You may be thinking about a page being a file. A site is a collection of those.
Re: Entire website in a single HTML file
#69Earlier quoted context omitted.
Nobody else is really doing this, or was doing this. But you can't tell that it's different, that's what's neat about it. It works just like a multi-page site but there's not even any JS requirement.
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.
Re: Entire website in a single HTML file
#70Man, I'm old.