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.Display the Location value as a link on the page
- B.Store the Location as a permanent bookmark
- C.Automatically make a new GET request to https://new-site.example.com/page (temporary redirect)
- D.Block the redirect as a potential open redirect
Why C 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.