Skip to content

Instantly share code, notes, and snippets.

@wcandillon
Created September 30, 2011 09:32
Show Gist options
  • Save wcandillon/1253247 to your computer and use it in GitHub Desktop.
Save wcandillon/1253247 to your computer and use it in GitHub Desktop.
declare module namespace ex = "http://www.28msec.com/example";
import module namespace cookie = "http://www.28msec.com/modules/http/cookie";
declare sequential function ex:howto-delete-a-cookie() {
cookie:set-cookie(
<cookie:cookie
name="examplecookie"
(: sets expires date to 1 second before now :)
expires="{fn:current-dateTime()-xs:dayTimeDuration('PT1S')}"
path="/"
domain="28msec.com">
</cookie:cookie>
);
"Cookie deleted";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment