Little web app tip
When to use 'get' and when to use 'post' in web pages? As a rule of thumb:
- If the request will cause a change of state on the web server, use 'post' (its safer as it avoids replay conditions caused by bookmarking or web-spiders)
- Otherwise use 'get'
But why use 'get' at all? Because if you have a lot of links on a page that are not dependent on form fields, it saves overhead on using form code (You can just put full parameterised links in the href's instead). Also, it means users can bookmark (e.g. useful for searches)
The wonders of pairing with Joe :)
1:59:58 PM
|