Forum Moderators: open
I have been asked if it is possible for the browser to redirect back to our home page after a period of inactivity.
I know that there are scripts to do this, but the users will have navigated away from our pages. Am I right in thinking that this could be achieved by frames, or is there another way?
If I do use frames, can anyone see any potential problems with this, apart from breaking the back button?
If anyone has any tips I'd like to hear them.
Cheers,
H.
It's not generally possible to apply JavaScript to windows or frames that contain other websites, but you might want to look into the option of "signed" JavaScripts.
Some reading for you:
[devarticles.com...]
;)
If you can specify the screensaver to activate after, say, 10 minutes of activity, and make that screensaver a script or application which would either wipe the browser history, cookies, etc. (to avoid a new user finding out what a previous user's activity was), or even better reboot the machine to a previously-saved state, which would not only clear browser history but also remove any toolbars, viruses, spyware which might have inadvertently been downloaded.
There are programs which are designed for kiosk machines where a reboot resets everything to a saved state. Of course, you could also do the same thing in Linux, with a minimal window manager so that the browser is the only application visible, and launched automatically full-screen.
.. but the users will have navigated away from our pages.
Like kaled said, if the user is still on your site it should be doable.
The reload function is more often annoying than not, but if you really want to, you could use that to reload the page after a certain amount of time, and have a script that checks whether the page is being automatically reloaded or not. To check if the page is reloaded or not, you'd need a timestamp to check the first request against the new request. You could use cookies to track the user, or have a query string appended. In any case you would make the script remember users for a certain amount of time only, or else it would probably mess up any future visits to that site. If the script finds that the page was reloaded, then redirect back to your home page.
1) Create a small window that contains the javascript required to control the main window.
2) Arrange for the small window to recreate itself if it is closed.
3) Make sure any popup blockers are configured to allow 2)
However, I'm not sure how you implement the necessary communications between windows. For instance, is it possible to monitor the keyboard/mouse activity of one window from another window or must each window monitor itself and send that information somehow to the small window.
A better solution would be a customised browser. There are several customised IE beasties that might provide this sort of functionality but it might be best implemented as a Firefox extension.
Kaled.
[opera.com...]