AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
Cache Control Is Crucial for React Apps
The browser has a cache built into it. So as the user clicks around, you've got stuff cached locally in memory. You can actually return cache headers from your data endpoints and remix them. And then there's another header called vary, you can say vary on the cookie. If that string changes in the cookie, then the browser will stop using that cache and it'll ask for the new thing. There's a lot of cool things that the browser can do that HTML has, that the DOM has, that HTTP has. All these things are standards, they're specifications. They're not like, we're not making up our own acronyms here, right?