Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature request: Add page refresh after cache stale dialog in --- stale.js --- #2

Closed
Chris75forumname opened this issue Sep 2, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Chris75forumname
Copy link

Chris75forumname commented Sep 2, 2021

Feature request: Add "page refresh" after "cache stale dialog" in stale.js

            dialogElement.dialog({
                dialogClass: "stale-dialog",
                closeOnEscape: true,
                modal: true,
                open: function () {
                    // close it after 2 seconds (toast)
                    setTimeout(function() { remove(dialogElement); }, 2000);
                    setTimeout(function() { window.location.reload(); }, 1300);
                }
            });

Works for me!
Cheers!

Source: https://stackoverflow.com/questions/3992353/javascript-function-to-reload-a-page-every-x-seconds

@gerardnico
Copy link
Member

That's true, that reloading is a natural need as everybody do it.
For now, I was lazy and was hitting the ''f5'' key.

If I see your code well, you reload before the closing of the dialog :)
I'm from the hard design school where every action needs a feedback.
May be that the dialog should come after the reload.

@gerardnico gerardnico added the enhancement New feature or request label Sep 3, 2021
@Chris75forumname
Copy link
Author

Chris75forumname commented Sep 3, 2021

Yes, please, however you like! This was only meant to be a working example. I am just a novice user who doesn't know better! And I'm not a software engineer (as a matter of fact, I'm a mechanical engineer :-) ) But, I am thinking of my users, who do not even know anything about the f5 key option! So it's better, when it's kept simple!
Yours, Chris

@gerardnico
Copy link
Member

There is no software engineer. I used also to work in the mechanical field and once upon a time, I had the whole metal table (you know: resistance and all other mechanical properties that you get after exposition to heat).

Done. I close it but if this is not what you expected or you have any other feedback, let a message.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants