Hacker News new | past | comments | ask | show | jobs | submit login

Well, I believe in Postel’s Law. Any opinions on the utility or danger of redirecting to the canonical URL instead?

E.g. I don’t want anyone’s campaign tracking tokens in the referer of our outbound links, or in URLs being shared around by copy-paste from the address bar.

However I also don’t want to inadvertently create a mechanism for someone to mechanically enumerate our routes (which we already see routinely attempted via return-path parameters), or walk into any similar trap besides.




Referenced (only partially quoted, and wholly unheeded) in the article, Postel's Law, also known as the Robustness Principle, says "be liberal in what you accept, and conservative in what you send."

https://en.m.wikipedia.org/wiki/Robustness_principle


I think this might be a good use case for history.replaceState - it'll change the URL in the address bar without actually redirecting.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: