by cryptos · 4y ago · 0 comments
A simple, generic way could be a hash of the original URL with a compact representation:
http://example.com/some/path/to/stuff?filter1=asdf&filter2=90#positionX
http://example.com/s/Wq_2
/s stands for "short" and the ID is the hash representation. If you use a-zA-Z0-9 plus some URL safe characters like _ it should be reasonably short even for large sites. The CMS or whatever software doesn't have to to implement something, because it is mostly just a generic URL shortener running on the same host.No comments yet.