View Full Version : Subdomain cookies not being passed in Ext.data.Connection?

2 Jul 2011, 11:16 AM

We have a Drupal installation that sets a cookie with path / and domain .domain.com. I have AJAX written in ExtJS (via Ext.data.Connection) that is sending cookies as described when the connection is to server domain.com, but isn't sending the cookies as described when the connection is to a subdomain, like subdomain.domain.com. As I understand it, it should be sending cookies for domain.com in requests to subdomain.domain.com, since the domain on those cookies is .domain.com and the path is /.

Am I wrong, or is there a configuration option somewhere I'm not finding to turn this on? Or something else?

Update: As I think about this more, I imagine that this is probably within the realm of the browser's responsibility, but if I create a test page in simple php on a subdomain to try this out, it works. That is, I can request a php page on subdomain.domain.com and it indeed gets the cookies for domain.com. So it seems like the request is somehow different when it happens via ExtJS?

Additional note: When my AJAX is calling out to subdomain.domain.com, document.domain for the page the AJAX is on is domain.com.

Andrew Davidoff

2 Mar 2012, 10:11 AM
+1. Am too looking at the same problem in Extjs4

2 Mar 2012, 10:15 AM
I guess we will need to implement a CookieProvider as noted in the link below.