offmycloud
5 days ago
The GET request method is supposed to be safe.
"Request methods are considered 'safe' if their defined semantics are essentially read-only; i.e., the client does not request, and does not expect, any state change on the origin server as a result of applying a safe method to a target resource." -RFC 9110 section 9.2.1
https://www.rfc-editor.org/rfc/rfc9110.html#name-safe-method...
stopachka
5 days ago
Here's my argument:
In practice many GET requests don't adhere to this spec. For example, when you load a page, your "view" generally changes lots of things on the backend. Those changes come back to you in ways too: for example, consider view counts on Youtube videos or X posts.
sandeepkd
5 days ago
These are just conventions, one can pretty much do whatever they want in their applications. At the same time convention has its own advantages (most of the times, think about code maintenance). Its still along the excepted line as long as the mutations are side effects of the GET request. Somewhere down the line the intent is to provide a separation to easily understand the systems.
noman-land
5 days ago
The GET request is issued to the web server for content of the HTML page and then all the scripts. Then the scripts issue POST/PUT requests to the analytics server updating the count.