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

Posted by Eric on 12/21/05 07:20

Mark Parnell wrote:

> Deciding to do something for the good of humanity, Eric
> <nospam@email.com> spouted in alt.html:
>
>> Ah, but that requires someone to click on it.
>
> Or they could type the address in the address bar, etc. Same as getting
> to any other page on this Interweb thingy.
>
>> I need to have this cgi run
>> when the page loads.
>
> You misunderstood Toby. The cgi *is* the page. The entire page is
> generated by the cgi script. So the address of the page is the address
> of the cgi.
>
This is what i dont get. Your telling me to generate the index.html page
using cgi? but the cgi cant run till its in a page and then your too late
the headers are long gone. or if i use a cgi to generate index.html then
what page causes execution of the cgi in the first place? thats what i
meant by chicken and the egg thing.
I think what this is boiling down to is that you cant set a cookie from
cgi. Am i right? I'm suspecting that the only way to do it is from some
javascript in a page
This cant be this complicated, people are setting cookies by the billions.
You should be able to do it from anywhere on a page it seems. ie, put a
form/button on a page, user clicks the button -gets a cookie set
or
user clicks a link, goes to new page, gets a cookie set by new page.
Eric



>> If i do <body onload="cgi-bin/my.cgi"> will that
>> satisfy the header requirement timing?
>
> No - the headers are sent by the server before the content of the page.
>
>> If this is in the site's idex.html
>> file will it set a cookie on any client that comes to the site?
>
> I highly doubt a cgi would run client-side at all, but even if it did it
> would fail for anyone with client-side scripting disabled/unavailable.
>

 

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

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