Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

madprabh's avatar

How to ensure new app.js is downloaded by browser

Hey Folks,

I have a rather basic question.

So I use npm to build my application and to deploy it on the production server. Obviously it creates app.js that bundles all my Vue components. When I make changes to my components a new app.js is created but my browser has already cached the previous one.

How do I ensure that new app.js is downloaded by the browser? Some kind of query string appending is needed?

Any tips on this one will help me a lot.

Best, Madhu

0 likes
2 replies
madprabh's avatar

Thanks a lot @sinnbeck! I appreciate the help and this is exactly what I was looking for.

Please or to participate in this conversation.