# Cache busting in Ionic deployed as PWA

**URL:** <https://forum.ionicframework.com/t/cache-busting-in-ionic-deployed-as-pwa/99290>\
**Category:** ionic-v3\
**Created:** [July 24, 2017, 2:02am UTC](https://forum.ionicframework.com/t/cache-busting-in-ionic-deployed-as-pwa/99290 "2017-07-24T02:02:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pjhartin](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pjhartin/32/105437_2.png) [@pjhartin](https://forum.ionicframework.com/u/pjhartin)\
**Post date:** [July 24, 2017, 2:02am UTC](https://forum.ionicframework.com/t/cache-busting-in-ionic-deployed-as-pwa/99290/1 "2017-07-24T02:02:23Z")

</div>

I’m wondering what methods are currently being used to handle cache busting for apps that use the lazy-loading @IonicPage decorators for apps that are deployed on the web.

Using standard workarounds like appending `v?=x.y.z` to the script path on index.html don’t work so great, as the browser only pulls down a fresh instance of `main.js` and not any of the sub-modules `1.main.js`, 2.main.js` etc.

Is there a recommended approach for this?

---

<div class="post-metadata">

**Author:** ![AaronSterling](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@AaronSterling](https://forum.ionicframework.com/u/AaronSterling)\
**Post date:** [July 24, 2017, 2:25am UTC](https://forum.ionicframework.com/t/cache-busting-in-ionic-deployed-as-pwa/99290/2 "2017-07-24T02:25:14Z")

</div>

Questions like this are in a major state of flux right now, because the devs are doing a major retool of the browser. Maybe the problem will still exist in three months, maybe you’ll have a different problem instead! But I think right now, your best options are to open an issue on GitHub, or wait and see what happens.

---

<div class="post-metadata">

**Author:** ![pjhartin](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pjhartin/32/105437_2.png) [@pjhartin](https://forum.ionicframework.com/u/pjhartin)\
**Post date:** [July 24, 2017, 2:45am UTC](https://forum.ionicframework.com/t/cache-busting-in-ionic-deployed-as-pwa/99290/3 "2017-07-24T02:45:35Z")

</div>

True, I was just wondering what people are resorting to at this point in time.

I’ve implemented something similar to what has been outlined here: [https://medium.com/@zwacky/pwa-create-a-new-update-available-notification-using-service-workers-18be9168d717](https://medium.com/@zwacky/pwa-create-a-new-update-available-notification-using-service-workers-18be9168d717)

With some modifications, including loading a bundled json file which contains instructions about various localstorage migration methods to run, or not run, after an update to the cache version.

---

<div class="post-metadata">

**Author:** ![JeffreyChen](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@JeffreyChen](https://forum.ionicframework.com/u/JeffreyChen)\
**Post date:** [December 12, 2017, 2:50pm UTC](https://forum.ionicframework.com/t/cache-busting-in-ionic-deployed-as-pwa/99290/4 "2017-12-12T14:50:39Z")

</div>

I am using lazy load module. Really hope ionic team can provide this feature.
