This behavior is intentional - Ctrl-Shift-T functions similarly to Ctrl-Tab in that it switches tabs without refreshing the content.
To achieve a similar effect, you can follow these steps:
1) Assign each request a random unique ID on the server-side, which is accessible in JavaScript
2) On unload
(or beforeunload
, test both), add the ID to an array cookie tracking unloaded IDs
3) Upon load
, check if the ID is in the array cookie. If present, the tab was unloaded before reloading. The load
event seems to be triggered by Ctrl-Shift-T
4) Remember to occasionally clear out the cookie ID array (and possibly store additional timestamps)
You can also experiment with using window.sessionStorage
instead of cookies/local storage for this purpose; I personally have not used it enough to fully trust it, but the concept remains the same - mark when the window is unloaded and check upon loading.