2 ms·
I’m sure it would be possible. You’d have to embed the CSS and JavaScript in https://github.com/lucaspiller/shortly https://github.com/lucaspiller/shortly into
by roryokane 13y ago
I’m sure it would be possible. You’d have to embed the CSS and JavaScript in https://github.com/lucaspiller/shortly https://github.com/lucaspiller/shortly into an HTML page, then represent that page as a data: URI. You could leave out the text-compression code and include only the decompression code, because the page only needs to decompress its embedded message. You would minify the code so there is less of it to store in the URL. You might even be able to shorten the URL by having the page bootstrap itself – DEFLATE all code except the code for INFLATEing, then INFLATE on the rest of the code for displaying the text, then run that code to INFLATE the text itself and display it.
Alternatively, you could just give someone a Shortly link and write a note next to it saying “If that link doesn’t work, just run that URL’s hash fragment through Base64-decode followed by INFLATE”, relying on the user to search for suitable software in that case. That would not help a user who is offline, unless their OS comes with utilities for those algorithms, but it would help if you’re just worried about Shortly going down.