Are hash referral codes in URL necessary?
Other sites' referral programs generate url's with hash co开发者_开发知识库des to represent the referrer. When the url is sent to and followed by friends and family, some kind of points or recognition system awards the referrer defined by the hash code...but why the hash code? Why not the user id?
I can see a few reasons:
- Obscure the user ID for privacy reasons
- Adds an abstraction layer so you can track where the referal came from. e.g. Hash #1 for links from stackoverflow, Hash #2 for links from expert-sexchange (sic), etc...
- Security so that a malicious user couldn't simply try all possible user IDs sequentially and rack up a lot of bogus referals - very trivial if the user IDs are simply numbers.
精彩评论