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.
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:
Give a short name to identify the rule in the Rule Details:
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.
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.
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.
The Background request rule may not be enough to keep session alive, if website idle timer is implemented in JavaScript in the website itself. The Background request rule keeps the session alive by auto-reloading the current page at the set auto-reload interval. The user need to set the Trigger URL such as the web application URL should starts with the Trigger URL else the rule will be stopped.
Please note the following:
Browser notifications can be set for the following:
Install from the Add-ons for Firefox website.
Update on August 3, 2022: Now this addon is available in Chrome and Edge browsers also. Install from the chrome web store