lainchan / Ω

Standalone web page

Cowboy · 2017-04-29 09:30
Why we don't have a way to create a standalone HTML page? For example, every time you open a page with images, your browser will open another TCP connection just to fetch the archive. It adds complexity and latency. Of course, we can put images in base64, but that's not usable for big file sizes. We can also put CSS, SVG and (sick) javascript inline. My main point is about media (audio, image, video, so on).
Jean Dupont · 2017-04-29 10:24
https://en.wikipedia.org/wiki/HTTP/2
Lain Iwakura · 2017-04-29 19:37
>>571 How this helps? It still loads the media content opening new tcp connections for every file...
fsociety · 2017-04-29 20:22
>>581 >HTTP/2 allows the server to "push" content, that is, to respond with data for more queries than the client requested. This allows the server to supply data it knows a web browser will need to render a web page, without waiting for the browser to examine the first response, and without the overhead of an additional request cycle.
Special Agent Bob · 2017-04-30 01:30
>>569 are you saying we should be able to create an html page like we can make new threads? that'd be interesting
Unsigned · 2017-04-30 04:22
>standalone HTML page The way I've always understood it, is that a single GET request is a request for a single resource. A hypertext document is a single resource that may link to other resources; should your server be hosting a text only page a single GET will yield the entire page (if we pretend that most modern browsers also send a request for a favicon). The issue is that when your page begins to link to other resources, (style, js, media) you're ofcourse going to have to make more requests. >It adds complexity and latency On the contrary, I think it has the opposite effect. The only way a "standalone HTML" document as you're describing could be done, is if the page was rendered on the server; which obviously is a terrible idea if your enemy is complexity and latency.