How to store the requested URL in a Cookie?

Document ID : KB000050681
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Having implemented a Policy that uses the "Request Context Variable" to store the URL in the cookie, it does not contain the query string/data.

The orginal URL is http://www.server.com/support/calldetails/pages/default.aspx?Css=~/_layouts/STYLES/RTL/GrayTheme/Css/Main.css&rand=0.5712838824298837

So here the URL is http://www.server.com/support/calldetails/pages/default.aspx and the query data is Css=~/_layouts/STYLES/RTL/GrayTheme/Css/Main.css&rand=0.5712838824298837 and it is this that is not getting stored in the cookie.

Solution:

Defining "IGNOREQUERYDATA=NO" in the Agent Configuration Object(ACO) resolves this problem and the WHOLE URL including the query data is stored via the REQUEST CONTEXT VARIABLE.

The IgnoreQueryData parameter affects the way Web Agents treat URLs.

A full URL string contains a URI, a hook (?), and some query data, such as:

   <URI>?<query data>

For example:

   /myapp.asp?myvar=data

By default, entire URLs that have been the subjects of requests are cached. Subsequent requests look in the cache for a match. The search for a match fails if requests for the same URI contain different query data. Therefore, ignoring the query data should improve performance.

The IgnoreQueryData parameter affects caching and rule matching:

  • If you set the IgnoreQueryData parameter to yes:

    • The URL is truncated at the hook. Only the URI is cached and sent to the Policy Server. The query data is maintained elsewhere, for the purpose of maintaining proper state for redirects.

    • Only the part before the hook (?) is sent to the Policy Server for rule processing.


  • If you set the IgnoreQueryData parameter to no (the default):

    • The entire URL is cached.

    • The entire URI is sent to the policy server for rule processing.

For example

If...                       Then...

IgnoreQueryData=Yes /myapp?data=1
/myapp?data=2
                            handled as the same resource 
IgnoreQueryData=NO          /myapp?data=1 
/myapp?data=2
                            handled as unique resources