Re:Show HN: I created a URL shortener that can be entirely h...
by nelsontky on Monday November 16, 2020 @12:39PM
(#25114557)
Base64 would probably be longer than the original URL. I can't really see how short pieces of text (like URLs) could be compressed to become smaller. That being said it's definitely a cool concept! I once worked on a code playground kinda thing for my school and there was a function to share the code written in a URL. How we did it was just to include the whole piece of code as a URL param in base64!
Re:Show HN: I created a URL shortener that can be entirely h...
by giancarlostoro on Monday November 16, 2020 @03:04PM
(#25116326)
Well that's why I said "type of" but yeah I can't see it either unfortunately, of course, as long as the URL you're trying to shorten isn't too insanely long it might be workable to do some sort of encoding on it.
Re:Show HN: I created a URL shortener that can be entirely h...
by hobby-coder-guy on Monday November 16, 2020 @11:02AM
(#25113239)
Why would you need a database for that?
Re:Show HN: I created a URL shortener that can be entirely h...
by giancarlostoro on Monday November 16, 2020 @12:37PM
(#25114526)
I realize I misspoke and update my message about why we used a database. I helped someone do a regular URL shortener, but have always been curious about doing a databaseless / no I/O on any server whatsoever based shortener.
I helped someone design a regular URL shortener in PHP before, they're not complicated to implement with a simple MySQL (or even SQLite) database and any language you're familiar with. I have not taken a stab at writing a client-side shortener yet on the other hand.
Edit: clarifying