ODBiC Discussion Board


RE: setcookie, sam, 07-25-2005

That should work; the JavaScript shouldn't affect it

by Roger Harris, July 25, 2005 10:06

If you have the setcookie before any other output, as Tim suggested, there will be a Set-Cookie HTTP header sent. If you have it in the <head> section, as in your example, then a <meta http-equiv="Set-Cookie" content="..."> tag will be output, which should be treated by the browser the same as a header, so your script should work. (The Javascript is just output as is, to be exectuted when the browser receives the page, so that shouldn't affect it.)

If you're sure it's not being set (which you should check by looking at your cookies files), then it could be a browser setting to not allow cookies.


Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


Copyright ©1997-2003, Roger Harris. All rights reserved.