4 ms·
An use case: I work daily with short links, because we need to pass parameters in URL and, depending on the amount of parameters you use in your URL, it gets b
by boredemployee 4y ago
An use case:
I work daily with short links, because we need to pass parameters in URL and, depending on the amount of parameters you use in your URL, it gets bigger quickly.
Then you have many stakeholders, with no IT background, using those links and if for some reason they use ctrl+c missing some part of that big URL, the access will be broken and then they will complain its not working.
Short links are better to avoid that problem.
- atahanacar 4y agoThat's why you have your own link shorteners. There is no reason to use some third party shortener that may or may not be alive the next year.
- boredemployee 4y agoI actually use a third party, because I'm not a dev and have no idea on how to do one myself.
- atahanacar 4y agoIt's actually very easy to implement if all you want is just shortening and you have the slightest idea about databases. All you need to do is generate a random string (functions that do this for almost any language are available online), save that string and the long URL to the database. If you want tracking and statistics though, it gets more complicated. The simple version can be a good way to get into web development now that I think about it. You learn about forms, GET/POST, databases, very basic SQL etc.
- boredemployee 4y agothanks a lot for elaborating it :) how it works with the domain tho? i need to buy a short domain that will concatenate with my database strings, is that correct?
- atahanacar 4y agoIf all you need to do is to "hide" the parameters, you can just use a subdomain of your choice regardless of the length, like post.domain.com or a.domain.com. However, if you want an actual "shortened" url, you will need a short domain name. Shorteners use TLDs other than .com to make it even shorter. For example, reddit.com uses redd.it for short urls.