Challenge - 5 Problems
Firebase Hosting Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate2:00remaining
Firebase Hosting: Default Behavior of index.html
When you deploy a Firebase Hosting site without specifying any rewrite rules, what happens when a user visits the root URL of your site?
Attempts:
2 left
💡 Hint
Think about what file Firebase Hosting looks for by default in your public folder.
✗ Incorrect
Firebase Hosting automatically serves the index.html file located in the public directory when the root URL is accessed, unless you configure rewrites or redirects.
❓ Configuration
intermediate2:00remaining
firebase.json: Correct Hosting Configuration
Which firebase.json configuration snippet correctly sets the public directory to 'dist' and enables single-page app (SPA) fallback to index.html?
Attempts:
2 left
💡 Hint
Look for the setting that rewrites all routes to index.html for SPA support.
✗ Incorrect
The rewrites array with source '**' and destination '/index.html' tells Firebase Hosting to serve index.html for all routes, enabling SPA fallback.
❓ Architecture
advanced2:00remaining
Choosing Firebase Hosting for a Multi-Region App
You want to deploy a web app globally with Firebase Hosting to ensure fast load times worldwide. Which Firebase Hosting feature helps achieve this?
Attempts:
2 left
💡 Hint
Think about how Firebase Hosting delivers static content quickly worldwide.
✗ Incorrect
Firebase Hosting uses a global content delivery network (CDN) that caches and serves your content from edge locations near users automatically.
❓ security
advanced2:00remaining
Securing Firebase Hosting with HTTPS and Custom Domains
After adding a custom domain to your Firebase Hosting site, what does Firebase do to ensure secure HTTPS connections?
Attempts:
2 left
💡 Hint
Consider how Firebase simplifies HTTPS setup for custom domains.
✗ Incorrect
Firebase Hosting automatically provisions SSL certificates via Let's Encrypt for custom domains and renews them without user intervention.
✅ Best Practice
expert3:00remaining
Optimizing Firebase Hosting Deployments for Large Sites
You have a large site with thousands of static files. To speed up deployment times and reduce bandwidth, which approach is best when using Firebase Hosting?
Attempts:
2 left
💡 Hint
Think about how to deploy only what changed to save time.
✗ Incorrect
Using the --only hosting: flag deploys only the specified hosting site, avoiding unnecessary uploads and speeding deployment.