Forum Discussion
Pradeep_Kandala
Sep 13, 2012Nimbostratus
Cookie Enabled/disabled
Can we check in browser weather the cookies are enabled or disabled ?? using IRules ?
If yes .. whats the code ??
Pradeep
Kevin_Stewart
Sep 13, 2012Employee
The problem is really WHERE you're doing the checking. JavaScript on the client side has direct access to the Document Object Model. From the BIG-IP, or ANY server side language, you have to perform a remote test - send a cookie and see if it gets returned. Plus, the stateless nature of HTTP requires that you have some mechanism, in this case other than cookies, to track a specific request/user process. If you send the user a cookie as part of your test, but don't have a way to identify that user as a returning request, you could end up in a loop. The above code very simply uses the /cookietest URI as the persistence mechanism. If you needed to allow users to access without cookie support, you'd need to build in another persistence/session tracking mechanism - like source address or query string.
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