Bird
0
0

A developer sets publicPath to '/cdn/' but assets fail to load from the CDN. What is the likely cause?

medium📝 Debug Q6 of 15
Remix - Performance
A developer sets publicPath to '/cdn/' but assets fail to load from the CDN. What is the likely cause?
ARelative path used instead of full CDN URL
BCache-Control header missing
CCDN does not support HTTPS
DAssets are not versioned
Step-by-Step Solution
Solution:
  1. Step 1: Analyze publicPath value

    Using '/cdn/' is a relative path, not a full URL to the CDN.
  2. Step 2: Understand asset loading failure

    Browser tries to load assets from the app domain + '/cdn/', not the CDN domain.
  3. Final Answer:

    Relative path used instead of full CDN URL -> Option A
  4. Quick Check:

    publicPath must be full CDN URL [OK]
Quick Trick: Always use full CDN URL in publicPath [OK]
Common Mistakes:
MISTAKES
  • Using relative paths for CDN URLs
  • Ignoring HTTPS requirement
  • Assuming versioning fixes URL issues

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Remix Quizzes