Skip to main content

Retrieving a Cookie

To get the value of the cookie, we simply call the GetCookie method with the name we used when the cookie was saved. The value is assigned to a variable, CatID, with the Set command.

This ObjectScript code appears within a <script> tag, which identifies it as a server-side script.

<html> <body>
<script language="cache" runat="server">
    Set CatID = %request.GetCookie("CacheCinemaLastCategory")
<h2><font color="#0000FF">Today's Top Picks</font></h2>
<table border=0>
        queryname='#(Query)#' P1="#(CatID)#">
<csp:while condition="FilmList.Next()"> ... </csp:while>
</body> </html>
FeedbackOpens in a new tab