Well, my favorite seems to be everybody's favorite. As of this writing, it's been downloaded almost as many times as the original template, which has been here for probably a year longer.
It works sort of like the typical Java refresh craplet, but without all the jumping and flashing, and it doesn't suck up all of your memory. (Can you tell I'm not too wild about Javacams?)
A brief history of this script (credit where credit's due): the Nose wrote the original version for the remote windows on his old Homecams site. Then, questionguy adapted it to just refresh the image. You can see it here (although on the surface, it doesn't really look any different). I stole it from him, added a few of my own touches and made it available here. It's since had a few more features added to it which I'll cover below. Features Just the image refreshes - other images, banners, CGIs, Java applets and whatever only have to load once. It's fairly easy to set up. The JavaScript is a little complicated, but there are only a few changes you have to make and they are clearly marked in the code. There are a few bugs associated with this script. Be sure to check the bugs, fixes and workarounds before using it. Opening the remote window turns the main page's refresh function off. This saves bandwidth and makes the remote load more quickly. The remote windows are resizable. (originally suggested by Marco [Yes, that Marco]) The remote window has a "Raise on Refresh" feature that makes it come to the front when it refreshes. The viewer can disable it by clicking on the image. Please leave the "disable" function in it and let your viewers know it's there. A promising career (or relationship) could be ruined by an inopportune refresh. (contributed by Sito) New! The biggest change in this version of the script is it's caching function. The image is preloaded just before it refreshes. I have this one set at 20 seconds. Watch your status bar. Then, when the timer gets to zero, the image reloads almost instantly (trust me on that one). And if your server gets bogged down and the image doesn't completely preload, it will still load just like any other image when it refreshes. Pretty slick! (contributed by S.A. Dave) New! The remote window now has a resizing function. Just click on the link and the window will resize to half its size, twice its size or back to normal size.(S.A. Dave again!) New! I fixed the problem with bad links to hitcounters, banners, button links to the "Small Barnyard Animal Top 100", etc. causing the timer to not start. It's now started by a call at the bottom of the page, rather than depending on the "onLoad" event. (contributed by me) New! I've also added a version that doesn't have a visible timer as well as copies of the old version, with and without the timer. The nag/splash screen and automatic time-out functions that I use on this page aren't included in the zip file. If you want to use them, feel free to lift them from this page. Bugs, Fixes and Workarounds The script is written in JavaScript 1.1, so it will only work with Netscape 3 and above, Internet Explorer 4 and above and WebTV. If you use it I suggest that you offer an alternate page for people with other browsers. I have added some code to eliminate the error message that IE3 was getting, so now it gets an alert box that says to reload the page manually. Now that I've said that the script works with Netscape 3, I'll mention that it seems to have a bug that causes it to expect a number in the timer box. I've changed the code so that now, when the remote window is opened, the timer says "00" instead of "OFF". Hopefully, that will work better with it. I ran into this problem on Direct Performance's ShopCam. Both the cam code and the hitcounter used a variable named "x". This made the timer say "NaN" (Not a Number). If you run into this, just go back and change all the "x's" (or whatever the conflicting variable is) in the cam code to something else. I used "a". Don't change anything in your hitcounter or it won't work. Using a refresh speed under 15 seconds with the new version can cause the the image to not refresh for viewers using slower modems or under heavy traffic conditions. In that situation you might want to use the old, non-caching version. Home | 2 Frames | 4 Frames | 5 Frames | No Frames JavaScript Refresh | Viewer Thingie | Netscape Problems | Comments |
Features
Bugs, Fixes and Workarounds