MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
WebPagetest Forums - Blocking a Cookie

WebPagetest Forums

Full Version: Blocking a Cookie
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Patrick,

I would like to run some tests with one particular cookie blocked. I tried the setCookie in the script, but I noticed the a new cookie was created and set to the value I specified, what I really awnted was to overwrite the original cookie. As a result, I ended up with two cookies (One looking like cookie=0, the other looking like cookie=<insert long string here>). Is there a way to do this in the script?

Thanks.
You might be able to use the setHeader command to override the cookie header for requests to the specific host. That's the only possibility that comes to mind.
(02-20-2013 09:49 AM)pmeenan Wrote: [ -> ]You might be able to use the setHeader command to override the cookie header for requests to the specific host. That's the only possibility that comes to mind.

Hey Patrick, can you give me a quick example?

I tried doing
setHeader Cookie: cookie=0;

But I notice the cookie I'm setting is still going to its default value.
(02-20-2013 11:28 AM)klee Wrote: [ -> ]
(02-20-2013 09:49 AM)pmeenan Wrote: [ -> ]You might be able to use the setHeader command to override the cookie header for requests to the specific host. That's the only possibility that comes to mind.

Hey Patrick, can you give me a quick example?

I tried doing
setHeader Cookie: cookie=0;

But I notice the cookie I'm setting is still going to its default value.

The Cookie header is sent in the request headers to indicate to the server that the client already has a cookie saved. The header to set the cookie value is Set-Cookie, which is sent in the response headers from the server.

So unless you can get WPT to alter the response headers, I would think that blocking the cookie would require changes on your end.


More info: http://msdn.microsoft.com/en-us/library/...s.85).aspx
(02-20-2013 11:28 AM)klee Wrote: [ -> ]Hey Patrick, can you give me a quick example?

I tried doing
setHeader Cookie: cookie=0;

But I notice the cookie I'm setting is still going to its default value.

Any chance you can link to an example (or PM one to me)? It's possible that there's a bug on my side or it's browser specific. Chrome and Firefox may be more likely to do it correctly since they modify the headers on the outbound writes directly on the wire.
Reference URL's