cookiesfantomafbedsheet

what's the fanws cookie?


I wrote a simple site using BedSheet to test adding cookies. When I ran the code and inspected the cookies using firebug, I found a extra cookie I didn't add named fanws (with value 06e3d816-7626-7b00-205a-0013e8a56e9d-dbc9c6c8fa03cfa4).

Here is my code:

class Site
{
    @Inject HttpCookies? cookie

    @Contribute { serviceType=Routes# }
    static Void contributeRoutes(Configuration Conf)
    {
        Conf.add(Route(`/index.html`, Site#index))
    }

    Text index()
    {
        cookie.add(Cookie("foo", "123"))
        return Text.fromHtml("<h1> Hello </h1>")
    }
}

What is this cookie? What is it used for? Where did this value come from?


Solution

  • fanws stands for Fanton Web Session and is added by the wisp web server to manage sessions. The value is just a UUID that uniquely identifies the session.

    You can read more in the web pod's documentation on Web Sessions.