2 Replies Latest reply on May 17, 2013 1:32 PM by MSWhat298

    CFCookie and domains

    MSWhat298

      My cfcookies are only good for "domain.com" and if a user goes to "www.domain.com" the cookie is not valid.  Any ideas on how I can make the cookie valid for the entire domain? 

       

      I have entered the domain as ".domain.com" in the cfcookie tag.  Coldfusion version is 8.

       

      Thanks!

      Mike

        • 1. Re: CFCookie and domains
          BKBK Adobe Community Professional & MVP

          It may de interpreted that domain.com and www.domain.com are different. Leave out the domain attribute. Then Coldfusion will set the cookie in the current domain, whatever that is. You could alternatively, and as a last resort, use Javascipt to set the cookie.

          • 2. Re: CFCookie and domains
            MSWhat298 Level 1

            Thanks for the input BKBK...you are exactly right, it was interpreting the domain and www.domain differently.  The cfcookie has been setting for years with no domain attribute and suddenly this problem came up. 

             

            I have tried it with and without the domain attr and it still will not include the "www" inside the domain like it should. 

             

            I solved the problem (so far so good at least) with a url redirect that sends all www requests to the regular domain name.

             

            ~Mike