The code uses a template string combining CDN_URL and the asset path.
Step 2: Substitute CDN_URL value
Replacing CDN_URL with 'https://cdn.example.com' results in 'https://cdn.example.com/build/_assets/logo.png'.
Final Answer:
https://cdn.example.com/build/_assets/logo.png -> Option C
Quick Check:
Template string + CDN_URL = full CDN asset URL [OK]
Hint: Replace variable with value inside template string [OK]
Common Mistakes:
Ignoring protocol https:// in URL
Using relative path instead of full CDN URL
Omitting the slash between CDN_URL and path
4. You configured your Remix app to serve assets through a CDN, but users report stale images. What is the most likely cause?
medium
A. CDN cache rules are not set to refresh on asset updates
B. DNS records are pointing to the wrong IP address
C. Remix app is not running on the server
D. Assets are missing from the Remix build folder
Solution
Step 1: Analyze stale content cause
Stale images usually mean CDN cached old versions and did not refresh after updates.
Step 2: Check other options
Wrong DNS or missing assets cause errors, not stale content; app not running causes downtime, not stale cache.
Final Answer:
CDN cache rules are not set to refresh on asset updates -> Option A
Quick Check:
Stale content = CDN cache refresh issue [OK]
Hint: Stale assets? Check CDN cache refresh settings [OK]
Common Mistakes:
Blaming DNS for stale cache
Assuming app downtime causes stale images
Ignoring cache invalidation rules
5. You want to configure your Remix app to serve static assets via a CDN while ensuring cache busting on asset updates. Which approach is best?
hard
A. Use a fixed asset URL and rely on browser cache only
B. Set CDN cache to never expire and manually clear cache on updates
C. Serve assets directly from the Remix server without CDN
D. Use hashed filenames for assets and update CDN cache rules accordingly
Solution
Step 1: Understand cache busting with CDN
Hashed filenames change when content changes, forcing CDN and browsers to fetch new files.
Step 2: Evaluate options for cache management
Use hashed filenames for assets and update CDN cache rules accordingly uses best practice: hashed filenames plus CDN cache rules. Others risk stale content or no CDN benefits.
Final Answer:
Use hashed filenames for assets and update CDN cache rules accordingly -> Option D