You are here: Re: cookie question « HTML « IT news, forums, messages
Re: cookie question

Posted by Eric on 12/20/05 08:24

Rob McAninch wrote:

> Eric>:
>> I'm playing around with cookies mostly as a learning experience.
>
>> <body>
>> <!--#exec-cgi="/cgi-bin/setcookie.cgi" -->
>> </body>
>>
>> The cgi just writes
>> "Set-Cookie: hello=its_me" to stdout
>> My question is:
>> is this correct?
>
> Not as an SSI. At the point the cgi is executed the content-type
> header has already been sent to the browser, too late for the
> set-cookie header. You could still use JavaScript at this point
> though (of course JS is now required to be enabled on the client
> browser).
>


> If you're entire page is created in CGI then just send out the
> cookie header before the content-type.
>
>
How is that done? I mean i can see how a cgi can send out the entire page
but how do you create the originating page in such a way that the cgi
executes before sending out headers? (Seems like a chicken and egg thing)
Eric

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация