2017-05-25
1.0.0
John Williams
All
All
Components, Libraries
[Overview]
Simple javascript timers and page refresh controls that allows you to call a notification on a single or interval timer as well as force a page refresh when using the browser back button.
[Detail]
interval Timer - Execute Timer on a regular interval
Do not place an interval timer inside a container that is being refreshed by the timer notify as this will have the effect of unnecessarily destroying and recreating the timer on each refresh.
Single Timer - Execute timer once after set duration.
Placing the single timer within a container that is refreshed by the timer notify will recreate the timer on each refresh effectively emulating an interval timer.
Back Refresh - Force page to refresh when accessed via the browser back button. This can cause a load delay as the browser will first access the cached page and then perform a location.refresh() to reload the page. If this causes an unacceptable delay then an alternative is to use a single timer of around 100ms and move the preparation code to the notify event. This will then force the preparation to run 100ms after a page load OR a browser back.