7 ms·
I spent some time looking at similar specs for more recent browsers, but wasn't able to find anything useful. This was for a proof-of-concept I made that stores
by jstrieb 5y ago
I spent some time looking at similar specs for more recent browsers, but wasn't able to find anything useful. This was for a proof-of-concept I made that stores entire web pages in URLs (creatively named "URL Pages") by base64-encoding them and putting them in the URL fragment (the part after the "#").
https://github.com/jstrieb/urlpages https://github.com/jstrieb/urlpages
The URLs this thing generates get pretty damn big sometimes, since I never got around to implementing compression. I can confirm that massive URLs from pages with inline images do work, but probably take some not-so-optimized code paths because they make my computer's fans spin up. Click at your own peril:
https://git.io/Jss7V https://git.io/Jss7V
- jfrunyon 5y agoOkay, but you can already store web pages in URLs. `data:text/html,<h1>Hi%20there!</h1>` You can even base64 encode them, if you want to.
- jstrieb 5y agoThis is true, but linking to data URIs no longer works. Many browsers block them for "security reasons." In Firefox, a link to that page is not clickable for me: https://git.io/JssFK https://git.io/JssFK From a convenience standpoint, it's also far less likely that a URL with an http: scheme will be blocked by a random web application than one with a data: scheme. For example it makes sharing on social media sites and chat applications more feasible.
- willcipriano 5y agoI made a service to store arbitrary files as URLs that is similar. The hard part is files that are too large, I can handle files up to 5mb if you click on them all via local storage. Compression helps a lot as making them base64 increases the size quite a bit. https://podje.li https://podje.li
- prox 5y agoCould you make whole webpages just through urls? Such as they will completely portable? Portable being taken with a grain of sand ofc.
- lurkerasdfh8 5y agonot the entire content, but a hash id is pretty common https://en.wikipedia.org/wiki/Magnet_URI_scheme https://en.wikipedia.org/wiki/Magnet_URI_scheme
- deleted 5y ago[deleted]
- boomlinde 5y agoYes, I did this for self-contained reports in maybe 2014. All images referenced (containing diagrams) were embedded as data URIs. Restrictions are AFAIK more picky now, though so YMMV in 2021.
- prox 5y agoCool project! It is kind of interesting that the link is the content, not sure it’s always useful, but for twitter like short form content perhaps?
- makapuf 5y agoWell webpages themselves including links, the embedding would need to be recursive.
- naugtur 5y agoI needed to send data over GET in 2012/2013 and built my own tiny LZW-alike compression to squeeze as much as possible into the 100kb which seemed to be the safe limit for non-ie browsers at the time
- naugtur 5y agoHere's the repo https://github.com/naugtur/ripper/ https://github.com/naugtur/ripper/
- drewzero1 5y agoThat's really interesting, I'd wondered if that was feasible! A few years ago I needed to send myself notes and URLs from a work computer to look at later, so I put it into the browser as https:// https://< my website >.com/index.html?saveforlater=note%20to%20myself When I got home I'd search the server logs for "saveforlater" and retrieve my note. Though it might have been faster to just write it on a slip of paper.
- Moru 5y agoI did that too, but the limit in my language was around 1024 characters in URL's so had to make small packets to send data.