Application Close on browser close

Hello Team

Am overwritting close() method in my application to invalidate the session.

When the user closes the browser directly than the application close methd taking 30 seconds to call or close session.

How can we reduce this time as waiting 30 seconds is too long.

Thank you team.