Menu

Adding a cache buster to esbuild

DEV Community: esbuild·Don Burks·6 months ago
#6tRZWOgO
#dev#e36858#code#html#build
Reading 0:00
15s threshold

Adding a Cache Buster to your esbuild Pipeline

You've got a great JS app, your users love it. But every time you want to deploy new code, you struggle with the same support messages from your users:

"I don't see it yet?"

"It still doesn't work."

"Do you know what you're doing?"

"I don't think you fixed it."

And of course, you have the same sentence being said to your screen that developers around the world over have said to theirs, repeatedly:

"But it looks great on my screen!"

This is all happening because the previous assets for your site, specifically your CSS and JS files, are cached in your user's browser. And since we can't ship your laptop around to every user until their cache expires, we need a way to allow users to get the updated version of the code as quickly as possible.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.