Tuesday 22 November 2011

Cookies capture - experimental feature. Give feedback!

Lately, I worked about cookie capture during request. It is not so simple as You can imagine.
Application use XMLHttpRequest class in javascript to handle requests. According to w3c spec it can't read some headers. One of it is "Set-Cookie" witch is responsible to set cookie on client. That's why I do not show cookies bar as an response to HTTP request.
Fortunately it is still chrome application and applications/extensions can read cookies. But, I can't read cookies from particular server response. I can handle all cookies change in all tabs, in all windows. It's kinda tricky because you don't know witch request actually creates the cookie.
So. When You start request application record all cookies that has been changed during this request. When response is loaded application stops recording cookies change and display results (if any recorded).

But I noticed that not always cookies are recorded during request. Sometimes they are set just after response is loaded and application already retrieved cookies list. This cookies will not be displayed. So when application creating response view it call delayed function (about 200ms) to get cookies after some time (when browser probably set does cookies).

I hope this will be good enough to make application more helpful.
If You have suggestions or have issue with cookies give feedback (google code issue tracker or in comments :)

Oh. Cookies capture in application is experimental feature and is disabled by default. To enable it go to "options" and check checkbox under "cookie capture".

No comments:

Post a Comment