Re: How to determine if a browser is cookie-enabled?

From: Bart S. (S._at_discussions.microsoft.com)
Date: 06/28/04


Date: Mon, 28 Jun 2004 05:56:01 -0700

Thanks Igor! I appreciate your help on this. I will try and get back with you to let you know how it went!

"Igor Tandetnik" wrote:

> "Bart S." <Bart S.@discussions.microsoft.com> wrote in message
> news:7FA2C0B6-2A44-4FDD-84B1-05E8F600AFFB@microsoft.com
> > Well, after reading the spec you gave below, I can say I am not doing
> > cookies correctly... yet. So there is that. Plus, the link is a
> > direct link to a well know site. 'www.bestbuy.com' to be exact.
>
> Checking with the packet sniffer, that's what bestbuy.com does. When you
> go there with your cookie cache clean, it redirects to
> http://www.bestbuy.com/?i=2, and simultaneously sets a cookie
> "totality=true". If the browser is set to accept cookies, the redirected
> request sends the cookie to this new location. That page checks that the
> cookie is in place, and promptly redirects back to
> http://www.bestbuy.com/. This time, you have the cookie, so the main
> page is rendered successfully.
>
> If the browser is configured to disable cookies,
> http://www.bestbuy.com/?i=2 page is reached with no cookie set, in which
> case it produces that "Cookies disabled in your browser" warning page.
>
> This matches the scenario I described.
>
> > Now, since I am building the crawler in Java ( no hissing please due
> > to this being a Windows newsgroup :) ), the page wouldn't be
> > redirected as I haven't implemented any 'meta' redirects.
>
> Do you honor 302 HTTP responses? You won't get far on the Internet
> without them.
>
> > Under this
> > assumption, the first page is a 'cookie not enabled' page and I
> > believe it to be the standard page everyone receives.
>
> It's the second page, after following a redirect - the standard HTTP
> one, not a <meta refresh> one.
> --
> With best wishes,
> Igor Tandetnik
>
> "For every complex problem, there is a solution that is simple, neat,
> and wrong." H.L. Mencken
>
>
>



Relevant Pages

  • Re: Login for access to certain pages or parts?
    ... I know roughly what an .htaccess file is and I have access to more than this on my own server, but not more on commercial servers that host various sites I have made or maintain. ... The successful login routine sets the cookie by testing to see if the password the user has entered matches the one in your database for that user. ... For pages that can be accessed by multiple groups, your authorize function could be passed a comma-delimited list of allowable groups for that page. ... // Authorizes user based on group, redirects if necessary. ...
    (alt.php)
  • Re: [PHP] Help with CURL please
    ... I'm trying to access this URL using CURL and grab ... Now the problem is that in order to access that site, a Cookie must be ... redirects you to http://enterprisedirectory.ucr.edu, sets the cookie ... http://enterprisedirectory.ucr.edu (thus leaving my script) and then ...
    (php.general)
  • Re: How to determine if a browser is cookie-enabled?
    ... "Bart S." ... go there with your cookie cache clean, it redirects to ... If the browser is set to accept cookies, ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Quick ? on Forms Authentication
    ... When i use it it redirects me to default.aspx(Which i guess it returns the ... Why doesn't my page i logged into expire after 2 minutes! ... And again after login in i have a button for SignOut ... >> my cookie expires it redirects me to the login page, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Quick ? on Forms Authentication
    ... When i use it it redirects me to default.aspx(Which i guess it returns the ... Why doesn't my page i logged into expire after 2 minutes! ... And again after login in i have a button for SignOut ... >> my cookie expires it redirects me to the login page, ...
    (microsoft.public.dotnet.framework.aspnet.security)