arunelias / session-alive

Session Alive
MIT License
101 stars 12 forks source link
firefox firefox-addon firefox-extension keep-alive session webextension

Session Alive

This add-on is used to keep the session alive for any website. Install and forget the session timeout messages.

Install from

Inspired by Dmitri Snytkine's wonderful Chrome add-on Staying Alive

Purpose

Session Timeout is great for Production websites, but not for Development and Testing. There are great add-ons for reloading webpages, but what about a "set it and forget it" solution?

Contents

Quick start

Get started creating a new Foreground Auto-Reload Rule with 1 minute interval.

Navigate to the Trigger URL in a new tab.


Main view (Information Pop-up)

The Main view is the informational page of the add-on where you can view the currently running Rules. Click the Settings button to open the Session Alive Settings page.

The rule will start running again if the user navigates to the Trigger URL after canceling the rule. To prevent this, the rule can be disabled or deleted.

Rules

A Rule should either contain Background Request or a Foreground Request with following items:

  1. Rule Name
  2. Trigger URL
  3. Request Interval

Rule Details

The Rule Name can be set here. Give a short name to identify the rule. The rule can be set as disabled using the Disable the Rule check-box.

If the rule is running, changes made are applied when the rule is restarted. To restart the rule, cancel the running rule and navigate to the Trigger URL again to restart the rule.

Background Request Options

The Background Request Rule is used to keep the session alive by requesting a page in the background. The page reload is not required as the process happens in the background using AJAX requests. The following options are available in the Background Request Options:

If a website implements a JavaScript idle timer in the browser itself, the Background Request Rule will not be enough to keep the session alive. Use Advanced options or Foreground Auto-Reload options in this scenario.

Foreground Request Options

The Foreground Request Rule is used to keep the session alive by auto-reloading current page in the browser. The following options are available in the Foreground Request Options:

A count-down timer will be displayed on the web page 30 seconds before it reloads automatically. Any unsaved data on the page may be lost when the page reloads. The browser will show a warning dialog if any form submission is repeated by the page reload. Please note that the count-down timer will not be displayed for web pages that uses FRAMESET element. However, page reloads automatically at the set interval.

Notification Options

Browser Notifications can be set here for the following conditions:

Background Request Advanced Options (To be Implemented)

These options can be useful when Background Request Rule is not enough to keep the session alive. The Background Request Rule alone is not enough when websites implements JavaScript idle timer in the browser itself.

This option requires a minimum knowledge of web programming to be able to properly use it.

The following options are available in the Foreground Request Options:

Example

For example: a web site uses jQuery session timeout plug-in for session timeout, setting the following JavaScript code will set the session timeout as 200 minutes.

    $.sessionTimeout({warnAfter: 9e6,redirAfter: 12e6});true;

Keep a return value or true; in the JavaScript code

Installation

Browser compatibility:

 

Firefox Multi-Account Container Support:

Version 2.0 now Support Multi-Account Containers

What's next

TODO

Credits

Info

Session Alive is written and maintained by Arun
License: MIT