0
0
Rest APIprogramming~5 mins

301 and 302 redirects in Rest API - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a 301 redirect?
A 301 redirect is a permanent redirect from one URL to another. It tells browsers and search engines that the page has moved permanently.
Click to reveal answer
beginner
What does a 302 redirect mean?
A 302 redirect is a temporary redirect. It tells browsers and search engines that the page has moved temporarily and may return to the original URL.
Click to reveal answer
intermediate
When should you use a 301 redirect instead of a 302 redirect?
Use a 301 redirect when you want to permanently move a page and transfer SEO value. Use 302 if the move is temporary and you want to keep the original URL indexed.
Click to reveal answer
intermediate
How do browsers handle 301 and 302 redirects differently?
Browsers cache 301 redirects because they are permanent, so they remember the new URL. 302 redirects are not cached as strongly because they are temporary.
Click to reveal answer
beginner
What HTTP header is used to specify the new URL in a redirect?
The 'Location' header is used in the HTTP response to tell the browser the new URL to redirect to.
Click to reveal answer
Which HTTP status code indicates a permanent redirect?
A301
B302
C404
D500
What does a 302 redirect tell search engines?
AThe page has moved temporarily
BThe server has an error
CThe page is not found
DThe page has moved permanently
Which HTTP header contains the new URL in a redirect response?
AContent-Type
BLocation
CAuthorization
DAccept
If you want to permanently move a page and keep SEO value, which redirect should you use?
A302
B404
C301
D200
How do browsers treat 301 redirects compared to 302 redirects?
ADo not cache either
BCache 302 redirects, but not 301 redirects
CCache both equally
DCache 301 redirects, but not 302 redirects
Explain the difference between a 301 and a 302 redirect and when to use each.
Think about whether the page move is permanent or temporary.
You got /6 concepts.
    Describe how browsers handle caching for 301 and 302 redirects.
    Consider the permanence of the redirect.
    You got /4 concepts.