HTML & CSS · Junior · Question 43 of 75
A form is submitted with the GET method. Where does the field data go?
- 1Into the HTTP request body, as with file uploads
- 2Into browser cookies, where the server reads them
- ✓Correct answer: Into the URL query string (
?name=value&...)
Explanation
With method="get" the data is encoded into the query string, so it's visible in the address bar and saved in history and logs - not suitable for passwords. POST sends data in the request body. Without JavaScript, a form is submitted via the action (URL) and method attributes of <form>.