DEV Community

Discussion on: How to Cache bust web app

Collapse
 
mnathani profile image
Murtaza Nathani

Umm, I believe what you referring to is unique file names that webpack generates ?

Would love to learn how webpack breaks browser cache too ?

Collapse
 
codewander profile image
Anon

From my high level understanding, you use webpack to generate unique files names for all css and js dependencies, but rely on http cache headers to force browser to reload index.html periodically. (I could be wrong in my understanding). It's not as instant as your solution, since it relies on browser rather than interactively triggering reload directly inside of the react app. I would use your solution for thousands of user. I would use something simpler for hundreds of users.

Thread Thread
 
mnathani profile image
Murtaza Nathani

It consist of two things:

  1. Cache busting using unique files in your CDN. Work's if you reload the application manually and you'll find the new code running
  2. Using code to cache bust as discussed in the article. Works for auto reloading app, without users have to manually reload..