Details
-
Suggestion
-
Resolution: Won't Fix
-
None
-
None
Description
NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.
It seems that almost every time I go to post a comment on an issue, I've had the issue open in my browser for long enough that the session has timed out. JIRA's XSRF protection kicks in, and I get to a page where I have to resubmit the comment. It's quite an irritating interruption – mainly because it's easily and completely preventable.
In Confluence, we have an AJAX "heartbeat" that keeps the session open while your browser is viewing a page. All you need to do is basically this:
window.setInterval(function () {
jQuery.get(AJS.contextPath + "/noop.jsp");
}, 300000);
This sends a request to the server every 5 minutes (300000 ms) in order to keep the session open. The interval needs to be short enough that it is less than the session timeout, but long enough that it won't overload the server with heartbeat requests.
If you want, you could also add additional information to the heartbeat response, like who else is viewing the issue at the moment. This is how Confluence does concurrent editing notifications in the editor.
Attachments
Issue Links
- is related to
-
JRASERVER-22667 JIRA loses posted parameters if you are timed out or log off in another window, so when you are redirected after logging in, you may receive a stacktrace due to missing params
- Closed
- relates to
-
JRACLOUD-21800 Adding a comment to issue times out when I have it open in my browser
- Closed