Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In my opinion, a link - as clickable by a user - should never be able to mutate the state of the system.


That's pretty much exactly how the web was designed – an anchor link is a GET request, a button is a POST.

However, as the article points out, this analogy breaks down once you go beyond basic HTML and into complex UI layouts.


Gonna be a tough sell for verification emails.


Not really - the link points to a page containing a button.

You'd need to do this for practical reasons too, considering links in e-mails might get automatically fetched whether for malware scanning, caching or generating a link preview, and it would erroneously trigger your verification workflow.


We can just agree that it should be a button and is only a link because of the limited HTML subset available in emails.


Isn't the current browser path part of that state?


Arguably, yes.

What I was really trying to go for with "state" in this context was something more like "business state". Things on the server that you change and can see with a refresh on a different client.


If it’s a GET, it’s a link, if it’s a POST, it’s a button? :)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: