File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
4
4
5
5
## [ Unreleased]
6
6
7
+ - Added cache busting.
8
+
7
9
## [ 2.0.0] - 2024-04-09
8
10
9
11
- [ #119 ] ( https://github.com/os2display/display-client/pull/119 )
Original file line number Diff line number Diff line change @@ -271,7 +271,14 @@ function App() {
271
271
if ( releaseTimestampRef ?. current === null ) {
272
272
releaseTimestampRef . current = config . releaseTimestamp ;
273
273
} else if ( releaseTimestampRef ?. current !== config . releaseTimestamp ) {
274
- window . location . reload ( false ) ;
274
+ const redirectUrl = new URL ( window . location . href ) ;
275
+ redirectUrl . searchParams . set (
276
+ 'releaseTimestamp' ,
277
+ config . releaseTimestamp
278
+ ) ;
279
+ redirectUrl . searchParams . set ( 'releaseVersion' , config . releaseVersion ) ;
280
+
281
+ window . location . replace ( redirectUrl ) ;
275
282
}
276
283
} ) ;
277
284
} ;
@@ -290,7 +297,7 @@ function App() {
290
297
const handleKeyboard = ( { repeat, metaKey, ctrlKey, code } ) => {
291
298
if ( ! repeat && ( metaKey || ctrlKey ) && code === 'KeyI' ) {
292
299
localStorage . clear ( ) ;
293
- window . location . reload ( false ) ;
300
+ window . location . reload ( ) ;
294
301
}
295
302
} ;
296
303
You can’t perform that action at this time.
0 commit comments