Session Alive Firefox add-on provides an important feature for testers as well as developers; keep the session alive for any website, even the user is inactive for long period of time.
Session timeout is great functionality and the best practice is to keep it as minimum as possible. For development and testing, session timeout creates an additional burden to login again if you are inactive for some time.
Staying alive is a Chrome extension which fulfills these requirements in Chrome. A Firefox alternative is missing. There are many extensions available for reloading the pages, but a “fit and forget it” solution is required.
Several years ago, Mozilla introduced WebExtensions to make it easier to develop extensions across multiple browsers. This architecture takes advantage of newer technologies, shortening time taken to review the extensions as well as improving protection against spyware and adware. This extension is based on this architecture.
- Settings page
- Information pop-up
- Page reload time & Notifications
A rule should be created in settings page to run the add-on on a website. A Rule should either contain Background Request or a Foreground Request with following items:
- Rule Name
- Trigger URL
- Request Interval
Give a short name to identify the rule in the Rule Details:
Background Request Options:
The Background request option can be selected if the session alive requests need to happen silently in the background without reloading the current page. The requests to keep the session alive happens in the background using AJAX requests.
Example 1: keep session alive for the web application with a dashboard at https://myapp.com/welcome with session time-out set at 8 minutes by the web server.
- Trigger URL: https://myapp.com/welcome
- Request interval: 5 minutes
Result: When the user login and the dashboard is displayed, the session alive rule is started and the Trigger URL is requested in every 5 minutes to keep the session alive.
Example 2: keep session alive for the web application with a resource heavy dashboard at https://myapp.com/dashboard and a user page of https://myapp.com/user with session time-out set at 8 minutes by the web server.
- Trigger URL: https://myapp.com/dashboard
- Background request URL: https://myapp.com/user
- Request interval: 5 minutes
Result: When the user login and the dashboard is displayed, the session alive rule is started and the Background request URL is requested in every 5 minutes to keep the session alive.
Foreground Request Options:
Please note the following:
- A count-down timer is displayed 30 seconds before page reloads automatically.
- A beep sound played 10 seconds before page reloads automatically.
- Any unsaved data in the page may be lost when the page reloads automatically.
- Browser will show a warning dialog if any form submission is repeated by the page reload.
Browser notifications can be set for the following:
- Background Page request successful to keep session alive
- Background Request is stopped because server response is not 200
- Page is auto-reloading to keep session alive
- Foreground Page auto-reload stopped
Install from the Add-ons for Firefox website.