How to sync client(browser) side session timeout to spring security server session timeout?

The goal is to Reset the spring security session timeout when the user is currently active in browser page (mousemove, click, mouseup, mousedown, keydown, etc.)