WebPagetest Forums
Explicitly Add cookie to request - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: Explicitly Add cookie to request (/showthread.php?tid=872)



Explicitly Add cookie to request - royrico - 06-24-2011 08:42 AM

Hi, i just wanted to know if this is possible, to add a cookie to a request to determine the difference between having a cookie and not having a cookie (we call different back end services on my page).

How would i tell one test to explicitly set a cookie and another to not have the cookie?

EDIT: OOPS, i put this into the wrong forum..

Thanks!


RE: Explicitly Add cookie to request - pmeenan - 06-24-2011 10:45 AM

Sure, you just need to use a script. There is an example of setting a cookie here: http://www.webperformancecentral.com/wiki/WebPagetest/Scripting#DNS_Override (just the last 2 lines of the script matter for setting the cookie).


RE: Explicitly Add cookie to request - royrico - 06-24-2011 01:37 PM

(06-24-2011 10:45 AM)pmeenan Wrote:  Sure, you just need to use a script. There is an example of setting a cookie here: http://www.webperformancecentral.com/wiki/WebPagetest/Scripting#DNS_Override (just the last 2 lines of the script matter for setting the cookie).

Awesome, thanks for the links, I guess I should've read the docs. I'm lazy like that!!


RE: Explicitly Add cookie to request - pmeenan - 06-24-2011 09:38 PM

np - the scripting is actually outside of the realm of what I expect people to be able to self-discover (less than 1% of users use it but you can do some cool things with it). Feel free to ping me if you have any questions with it.