A simple utility to reload a web page after a certain period of inactivity.
Check the example.html for a simple example.
import { Reloader } from "../reloader.js";
// Initialize with custom options
Reloader.init(
30, // (countTillWarn) Number of seconds until warning message is shown
300, // (countTillReload) Number of seconds until page reloads
1000, // (countIntervalMs) Interval in milliseconds to check for activity
"", // (warningMsg) Custom warning message (optional)
);
- Monitors user activity and reloads the page after a specified period of inactivity
- Customizable warning message and time limits
- Simple and lightweight
This project is licensed under the MIT License - see the LICENSE file for details.