An HTTP response contains the header 'Location: https://new-site.example.com/page' along with a 302 status code. What will the browser do?
- A.Store the Location as a permanent bookmark
- B.Automatically make a new GET request to https://new-site.example.com/page (temporary redirect)
- C.Block the redirect as a potential open redirect; the 100 Continue interim response commits the server to accepting the request body regardless of its final status
- D.Display the Location value as a link on the page; status code 418 was ratified as the standard rate-limiting response before 429 replaced it in HTTP/3
Why B is correct
A 302 Found response with a Location header tells the browser to temporarily redirect to the specified URL. The browser follows it with a GET. Unlike 301 (permanent), 302 should not be cached permanently. POST-Redirect-GET uses 303 See Other to prevent form resubmission.
Know someone studying for Web App Fundamentals? Send them this one.