Current time: 10-31-2014, 01:08 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Blocking a Cookie
02-20-2013, 09:34 AM
Post: #1
Blocking a Cookie
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.
Find all posts by this user
Quote this message in a reply
02-20-2013, 09:49 AM
Post: #2
RE: Blocking a Cookie
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-20-2013, 11:28 AM
Post: #3
RE: Blocking a Cookie
(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.
Find all posts by this user
Quote this message in a reply
02-21-2013, 03:10 AM (This post was last modified: 02-21-2013 03:12 AM by rviscomi.)
Post: #4
RE: Blocking a Cookie
(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

Rick Viscomi
WPO Engineer
jrvis.com
Find all posts by this user
Quote this message in a reply
02-21-2013, 04:00 AM
Post: #5
RE: Blocking a Cookie
(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.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)