Skip to content

Commit 5415be4

Browse files
authored
Merge pull request #22 from Locutus83/Locutus83-ie-11-cache-buster
Prevent caching of the extendUrl calls
2 parents f0442b2 + d8379b5 commit 5415be4

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/jTimeout.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,13 @@
278278
mouseDebounce: 30, //How many seconds between extending the session when the mouse is moved (instead of extending a billion times within 5 seconds)
279279
onMouseMove: function(timeout){
280280
//request the session extend page
281-
$.get(timeout.options.extendUrl, function(){
282-
//reset expiration
283-
timeout.resetExpiration();
281+
$.get({
282+
url: timeout.options.extendUrl,
283+
cache: false,
284+
success: function(){
285+
//reset expiration
286+
timeout.resetExpiration();
287+
}
284288
});
285289
}, //Override the standard $.get() request that uses the extendUrl with your own function.
286290
extendUrl: '/dashboard', //URL to request in order to extend the session.
@@ -324,7 +328,10 @@
324328
//override the click to extend button callback
325329
onClickExtend: function(timeout){
326330
/* Request dashboard to increase session */
327-
$.get(timeout.options.extendUrl);
331+
$.get({
332+
url: timeout.options.extendUrl,
333+
cache: false
334+
});
328335
timeout.resetExpiration();
329336
},
330337
//override the timeout function if you'd like

0 commit comments

Comments
 (0)