Skip to content
This repository was archived by the owner on Oct 8, 2019. It is now read-only.

Commit 7de0b2c

Browse files
committed
fix(Legacy): bust cache
1 parent 3a709fc commit 7de0b2c

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

Gruntfile.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ module.exports = (grunt) ->
186186
{src: ["polyfill.js"], dest: "build/js/", cwd: "node_modules/babel-polyfill/dist", expand: true}
187187
]
188188

189+
legacy_cache_bust:
190+
files: [
191+
{src: ["legacy-cache-bust.js"], dest: "dist/wallet.min.js", cwd: "assets", expand: true}
192+
]
189193

190194
css:
191195
files: [
@@ -491,6 +495,7 @@ module.exports = (grunt) ->
491495
"copy:main"
492496
"rename:assets"
493497
"rename:html"
498+
"copy:legacy_cache_bust"
494499
]
495500

496501
# Run dist first

assets/legacy-cache-bust.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Redirect users to the new wallet
3+
* page in a way that busts stale caches
4+
*/
5+
window.location.pathname = 'wallet';
6+
window.location.hash = '';
7+
window.location.queryString = 'bustcache=20160504';

0 commit comments

Comments
 (0)