Skip to content

Commit 95ca1e5

Browse files
committed
added no-cache to headers for reloads
1 parent dd4e432 commit 95ca1e5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/core/src/router.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,16 @@ export class Router {
7979
}
8080

8181
public reload(options: ReloadOptions = {}): void {
82-
return this.visit(window.location.href, { ...options, preserveScroll: true, preserveState: true, async: true })
82+
return this.visit(window.location.href, {
83+
...options,
84+
preserveScroll: true,
85+
preserveState: true,
86+
async: true,
87+
headers: {
88+
...(options.headers || {}),
89+
'Cache-Control': 'no-cache',
90+
},
91+
})
8392
}
8493

8594
public remember(data: unknown, key = 'default'): void {

0 commit comments

Comments
 (0)