Setting document.cookie only supports setting a single cookie at a time. Currently use_cookie will try to set multiple cookies by serializing the whole cookie jar. This PR fixes setting and deleting cookies from the client, and adds a second counter to the use_cookie example. This example is broken with the current use_cookie implementation and works correctly in this branch.
Unfortunately cookie uses time so jar.remove doesn't work in WASM, which makes the implementation a bit awkward (have to first add the cookie with value="" and expires=0, and then afterward call jar.force_remove)
Setting
document.cookie
only supports setting a single cookie at a time. Currentlyuse_cookie
will try to set multiple cookies by serializing the whole cookie jar. This PR fixes setting and deleting cookies from the client, and adds a second counter to theuse_cookie
example. This example is broken with the currentuse_cookie
implementation and works correctly in this branch.Unfortunately
cookie
usestime
sojar.remove
doesn't work in WASM, which makes the implementation a bit awkward (have to first add the cookie with value="" and expires=0, and then afterward calljar.force_remove
)