

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: Caching
incomplete
2: Cache Busting
incomplete
3: Cache Headers
incomplete
4: New Files
incomplete
This lesson's interactive features are locked, please to keep using them
Query strings are a great way to brute force cache controls as the client - but the best way (assuming you have control of the server, and c'mon, we're backend devs), is to use the Cache-Control header. Some common values are:
no-store: Don't cache this at allmax-age=3600: Cache this for 1 hour (3600 seconds)stale-while-revalidate: Serve stale content while revalidating the cacheno-cache: Does not mean "don't cache this". It means "cache this, but revalidate it before serving it again"The fact that no-cache means "lol jk you can actually cache this just check with me first" makes me feel some sort of way
You can view all the other options here if you're interested.
When the server sends Cache-Control headers, it's up to the browser to respect them, but most modern browsers do.
Let's do things the right way and control caching with headers from the server.
Run and submit the CLI tests.
Reassigning an image's existing src may not trigger a request, even with caching disabled. That's image loading behavior, not a failure of no-store.