HTTP Request Types & Caching
GET vs POST, and how browsers cache responses.
HTTP Request Types
Also known as request methods. The most popular are get and post, used to retrieve and send client form data to a web server.
| GET request | POST request |
|---|---|
|
Sends form content as part of the URL Retrieves the appropriate resource from the web server Limits the query to 1024 characters |
Updates the contents of the web server (e.g. posting new messages to a forum) Has no limit on query length Not part of the URL and cannot be seen by the user |
POST data is sent to a server-side form handler.
Caching
- Browsers cache (save on disk) web pages, allowing for quick reloading.
- They cache responses to GET requests.
- They do not cache responses to POST requests.