We have a web app that is designed as a single page application (SPA) that uses AJAX. Our clients have a problem when this is hosted behind TMG. Because only one page request is made at the start of use the session times out. After TMG times out and our application makes another AJAX request they get a redirect to a login page returned as the AJAX response. We are expecting a JSON response but we get a HTML response (the login page). We handle this and check the type of response we receive and display a message to the client asking them to refresh the page. This then redirects them to their TMG login page and then back to our application. We would like it if the session would be extended whenever our web application makes an ajax request.
How can we configure TMG so that any HTTP request (including the AJAX request) will extend the session time.