Auto-detect Detection Mode
Supports both ETag mode and version file mode, automatically selected based on configuration
Auto-detect detection mode, default auto-polling, manual detection supported
Version Check JS is a powerful, lightweight frontend version detection tool built with native JavaScript. It provides rich functionality for detecting version changes in frontend applications, including auto-polling, manual detection, custom callbacks, auto-generated version files, format optionsv2.0.0+, and more.
// Simple usage
const versionCheck = new VersionCheck();
versionCheck.start();
// Advanced configuration
const versionCheck = new VersionCheck({
url: '/version.json',
interval: 5 * 60 * 1000,
message: 'New version detected, update now?',
onUpdate: () => {
if (confirm('New version detected, update now?')) {
versionCheck.reload();
}
}
});
versionCheck.start();Version Check JS works with all modern browsers, including:
MIT License