Forum Discussion
AngryCat_52750
Nimbostratus
Jan 30, 2014end APM session on browser close
Is there a way to end a APM session when the user closes a browser window?? i understand this is a client side event but can the APM do anything? We have a APM policy with a login page and once a use...
MichaelatF5
Employee
Jul 29, 2014Does the application have a logout URI? You can add the URI to APM which can use that to tell it to kill the persistent cookie.
The following is an example that injects javascript into the page using a stream profile, looks for a browser close in IE and transparently redirects the page to the signout page, telling APM to kill the session.
This specific example was developed for SharePoint, but could work for anything really, just change the URI around to suit your needs.
when HTTP_REQUEST {
Looks for SharePoint hangup, kills APM session.
if { [string tolower [HTTP::uri]] contains "signout.aspx"} {
ACCESS::session remove
}
STREAM::disable
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
Check if response type is text
if { [HTTP::header value Content-Type] contains "text" } {
Define the stream replacement
Change the 15 in the following line to the version of sharepoint being used 13 = 2007 / 14 = 2010 / 15 = 2013
STREAM::expression {@@ @}
STREAM::enable
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects