Skip to content

Commit

Permalink
fix: cache problem (attempt 4)
Browse files Browse the repository at this point in the history
  • Loading branch information
tc-imba committed Jun 25, 2024
1 parent 742d417 commit 91d6c8f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
introduction: [
'You can write one or several paragraphs to introduce yourself here. You can find this introduction in the `config.js` file in the template.',
'In this site, almost everything supports Markdown Syntax. For example, you can add hyperlinks in the introduction such as [fxhsb](https://github.com/Reapor-Yurnero) with\n```markdown\n[fxhsb](https://github.com/Reapor-Yurnero)\n```',
'Here we try to test whether reloading is enabled when site updated (2).',
'Here we try to test whether reloading is enabled when site updated (3).',
],
avatar: 'avatar.png',
professions: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import {
export const wrapPageElement = _wrapPageElement;

// trigger an immediate page refresh when an update is found
export const onServiceWorkerUpdateFound = () => {
console.log('update found, reload the page');
window.location.reload();
};

export const onServiceWorkerUpdateReady = () => {
console.log('update found, reload the page');
window.location.reload();
Expand Down
File renamed without changes.

0 comments on commit 91d6c8f

Please sign in to comment.