Recall & Review
beginner
What is a redirect rule in Firebase Hosting?
A redirect rule sends visitors from one URL to another URL automatically. It changes the address shown in the browser.
Click to reveal answer
beginner
What does a rewrite rule do in Firebase Hosting?
A rewrite rule serves content from a different location without changing the URL in the browser. It keeps the original URL visible.
Click to reveal answer
intermediate
How do you define a redirect rule in Firebase Hosting configuration?
You add a 'redirects' section in firebase.json with 'source' (the URL to match) and 'destination' (where to send users), plus a 'type' for HTTP status code.
Click to reveal answer
intermediate
Why use rewrite rules for single-page applications (SPA)?
Rewrite rules send all URL requests to the SPA's main index.html file, so the app can handle routing internally without server errors.
Click to reveal answer
beginner
What HTTP status code is commonly used for permanent redirects in Firebase?
The HTTP status code 301 is used for permanent redirects, telling browsers and search engines the change is permanent.
Click to reveal answer
In Firebase Hosting, what happens when you set a rewrite rule?
✗ Incorrect
Rewrite rules serve content from a different location without changing the browser's URL.
Which section in firebase.json defines redirect rules?
✗ Incorrect
Redirect rules are defined under the 'redirects' section in firebase.json.
What HTTP status code should you use for a temporary redirect in Firebase?
✗ Incorrect
302 is the HTTP status code for temporary redirects.
Why are rewrite rules important for SPAs hosted on Firebase?
✗ Incorrect
Rewrite rules send all requests to index.html so the SPA can manage routing internally.
Which Firebase Hosting feature changes the URL shown in the browser?
✗ Incorrect
Redirect rules change the browser URL to the new destination.
Explain the difference between redirect and rewrite rules in Firebase Hosting.
Think about what the user sees in the browser address bar.
You got /4 concepts.
Describe how you would configure Firebase Hosting to support a single-page application using rewrite rules.
Consider how SPAs handle navigation internally.
You got /4 concepts.