Re: Detecting if Browser Accepts Cookies & JavaScript

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: SHarris (sharris_at_nospam.com)
Date: 02/11/05


Date: Fri, 11 Feb 2005 13:08:19 -0700

Again, thanks for the info. But, after reviewing Request.Browser.Cookies
and Request.Browser.JavaScript, these two properties simply return true if
browser client "supports" Cookies and JavaScript, respectively. This is
good to know.

But, what we really need is a way to check and make sure the user has not
disabled Cookies and JavaScript through security settings. Any thoughts?

"Juan T. Llibre" <nomailreplies@nowhere.com> wrote in message
news:ejemrVGEFHA.3976@tk2msftngp13.phx.gbl...
> Use
>
> Request.Browser.Cookies
> and
> Request.Browser.JavaScript
>
> If the value returned is true, they are enabled.
> If false they are not enabled.
>
> PLace it in the login page's Page_Load,
> and redirect as appropiate ( maybe to a page
> which tells the user that they are a requisite. )
>
>
>
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espaņol
> =====================
>
> "SHarris" <sharris@nospam.com> wrote in message
> news:eh7c5LGEFHA.1012@TK2MSFTNGP14.phx.gbl...
> > Hello,
> > In our new intranet ASP.NET project, two requirements are that the
browser
> > accept cookies AND JavaScript. We are requiring the use of Internet
> > Explorer 6+.
> >
> > 1. Using C# in an ASP.NET application, how can we code the project to
> > check
> > to make sure the browser accepts cookies?
> > 2. Where would we put this code? In Global.asax?
> > 3. Using C# in an ASP.NET application, how can we code the project to
> > detect and make sure the browser is configured to run JavaScript?
> > 4. Where would we put this code?
> >
> > Thanks in advance!
> >
> >
>
>



Relevant Pages

  • Re: Globale Variable
    ... Sagte ich ja;) Aber Cookies sind schon recht verbreitet, ... ganz aehnlich wie Javascript wuerde ich mal sagen. ... Richtig, es macht _kein_ Browser. ... nicht mit einer Tagsuppe, die Links durch ...
    (de.comp.lang.javascript)
  • Dulux: Nice sheepdog, crap website
    ... Your browser is not responding properly. ... JavaScript and cookies to work properly and it may be that your ... or Netscape on Windows, ...
    (uk.net.web.authoring)
  • Enable Javascript/cookies?
    ... When I try to register at a trusted site, ... Your browser either does not support JavaScript or cookies, ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: dont waste bits...
    ... only with a "Sorry, can't do JavaScript" note. ... and when I first accessed my login page with Java and ... "This website makes extensive use of both cookies and JavaScript. ... these features enabled in your browser, ...
    (rec.arts.comics.strips)
  • Re: Detecting if Browser Accepts Cookies & JavaScript
    ... "bruce barker" wrote in message ... > to tell if cookies are enabled, set a cookie value, and redirect to a page ... > | browser client "supports" Cookies and JavaScript, ...
    (microsoft.public.dotnet.framework.aspnet)