UPDATE: Chili 1.0_b has been released
- Syntax highlighting for the browser; IE, Firefox, Mozilla, and Opera friendly
- 100% compatible with Code Highlighter 0.4 styleSets
This software is gratis.
You could buy me a cappuccino, but it’s up to you.
Refreshing content could be loaded in an invisible container and then copied to the visible one if it’s valid. The validity check could be in the content itself: a function call at the end of the body will do.
Prepare two containers for your content: VisibleContainer, and HiddenContainer. Define two global script functions: refreshVisible(), and refreshHidden().
- download fresh content to the HiddenContainer
- reset a timer for calling refreshHidden() after x seconds
- if not called from HiddenContainer then exit
- copy fresh content from HiddenContaner to VisibleContainer
Finally, call refreshHidden() from the onLoad event of VisibleContainer, and make a call to refreshVisible() from the very end of the content loaded in HiddenContainer.
If there is a loss of connectivity, then there is no call to refreshVisible(), and no error is shown. Also, the timer will continue to run and it will call refreshHidden() upon expiration.
(revised text from my own comment 12628152 at Experts-Exchange)