Live data from Hacker News

Entire website in a single HTML file

css-tricks.com

271–280 of 333 posts

Re: Entire website in a single HTML file

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

> And now it's even less scalable to larger sites

And how is 20MB js SPA with 20 wss connections more scalable?

I've see too many react/vue projects bundling everything into a single main.js file even pages I never click. e.g. some crazy map or graph module. Is there some magic in webpack to make sure the needed functions gets executed in "eagerly" fashion?

Or does json provide streamable parsing capabilities?

Re: Entire website in a single HTML file

#273
post #265

Earlier quoted context omitted.

Having an entire Website in a single HTML page was definitely possible.

Not if you wanted multiple pages without Javascript it wasn't. Which is what's interesting about the site being described, although the article does a weak job explaining it.

That is moving the goalposts, with DHTML or not, it can be a single HTML page.

Re: Entire website in a single HTML file

#274

Earlier quoted context omitted.

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

I find inline links incredibly disruptive to my reading flow, the change in color makes my eyes start jumping around in the text. Wikipedia especially is absolutely hopeless, to the point where I've built a mirror that removes all inline links. (A page looks like this: https://encyclopedia.marginalia.nu/wiki/Hyperlink )

Just found this FF add-on [1], yesterday, which removes all links from a page. Works reasonably well. Can also invoke reader view after removing links and get the benefits there.

[1] https://addons.mozilla.org/en-GB/firefox/addon/nolinks/

Re: Entire website in a single HTML file

#275
post #261
post #119

Earlier quoted context omitted.

I’m not sure that Google Maps is the best example of something that should work well without JS.

True, but even Google Maps could work without Javascript... It may not be as easy to use without it though.

I still remember the first time I used google maps. It was the first example I ever saw of what was then called AJAX, and it blew my mind. Without javascript, google maps would have been the same as mapquest (or any other mapping sites from that era): a full page refresh to move or zoom on the map. Javascript was the differentiator that made google maps the winner.

Re: Entire website in a single HTML file

#276

Earlier quoted context omitted.

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

window.status to the rescue! We must override the long scam URL there!

Re: Entire website in a single HTML file

#277
post #258

Earlier quoted context omitted.

I have never understood why footnotes are added to the bottom when we have an interactive medium available at hand? Why not leverage and to show them in-place without breaking the flow and without listing them all at bottom? See your comment as an example. Why list all links at the bottom rather than in-place?

> Why not leverage and to show them in-place Searchability. You want footnote content to be Ctrl+F-able.

A smart browser could understand footnotes and show them in searches.

Re: Entire website in a single HTML file

#278

Earlier quoted context omitted.

You're making vague gestures about something that is a specific issue these days. JS delivers all kinds of straight up garbage, some of it meant to do very ugly things, it can be turned off, tada, I'm still on the internet. If people (like me) want to offer resources requiring none of that, why not encourage them, insofar as it makes the internet more efficient, a more helpful resource, and just way cooler in terms o…

This is an unusually defensive response. There's a big gap between "all kinds of straight up garbage, some of it meant to do very ugly things" and the tiny amount of JS that would replace what this does. This doesn't even enable any interesting functionality. You could simply put multiple html files on the same web server rather than putting everything into one file. The visitor to the website would not know the diff…

Did you read what you wrote? You assumed and implied that I was _scared of JS_ without asking whether this was the case, then called my response unusually defensive. Let's not sweep it under the table.

Your original reply was really uncalled for. Now you're back to some combination of hand-waves and missing the details (which self and others have shared up and down the thread already).

Really, a more respectful, thoughtful approach is merited.

Re: Entire website in a single HTML file

#279
I sometimes convert pages to a single HTML file with SingleFile[0] which encapsulates all external assets into a single page. I have a small collection of pages which I can browse offline, and also have them for posterity incase they suffer from link rot.

[0] https://addons.mozilla.org/en-US/firefox/addon/single-file/

Re: Entire website in a single HTML file

#280
post #273

Earlier quoted context omitted.

Not if you wanted multiple pages without Javascript it wasn't. Which is what's interesting about the site being described, although the article does a weak job explaining it.

That is moving the goalposts, with DHTML or not, it can be a single HTML page.

I'm not moving the goalposts, my goalposts are exactly where they were in my first comment: The concept demonstrated in the article was not possible twenty years ago.

In fact I was very specific about what concepts were not possible twenty years ago: "What's being shown off here is not having a single page of a website in just HTML/CSS, but having all pages."

You're the one who proceeded to ignore that and make an unrelated claim about something different that was possible twenty years ago.

Post reply on HN