Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > asp based browser sniffer that detects if browser supports css

Reply
Thread Tools

asp based browser sniffer that detects if browser supports css

 
 
AMC
Guest
Posts: n/a
 
      01-12-2005
Hi,

I need to code an asp based browser sniffer. It needs to detect if a browser
can support css and if not redirect to a different site. Does anyone have
sample code that does this?

thx



 
Reply With Quote
 
 
 
 
larrybud2002@yahoo.com
Guest
Posts: n/a
 
      01-12-2005

AMC wrote:
> Hi,
>
> I need to code an asp based browser sniffer. It needs to detect if a

browser
> can support css and if not redirect to a different site. Does anyone

have
> sample code that does this?


Retrieve the version and type of the browser and redirect based on
those values.

 
Reply With Quote
 
 
 
 
AMC
Guest
Posts: n/a
 
      01-12-2005
Thanks, but how do I tell based on the version and type if css is supported?

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>
> AMC wrote:
> > Hi,
> >
> > I need to code an asp based browser sniffer. It needs to detect if a

> browser
> > can support css and if not redirect to a different site. Does anyone

> have
> > sample code that does this?

>
> Retrieve the version and type of the browser and redirect based on
> those values.
>



 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-12-2005
AMC wrote:
> Hi,
>
> I need to code an asp based browser sniffer. It needs to detect if a
> browser can support css and if not redirect to a different site. Does
> anyone have sample code that does this?
>
> thx

Do a quick Google for Browserhawk

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
AMC
Guest
Posts: n/a
 
      01-12-2005
Thanks, but I've looked at Browserhawk, and I need to write this myself
rather than purchase something, is there a list somewhere of browsers that
don't support css?

"Bob Barrows [MVP]" <(E-Mail Removed)> wrote in message
news:eOBLNOO%(E-Mail Removed)...
> AMC wrote:
> > Hi,
> >
> > I need to code an asp based browser sniffer. It needs to detect if a
> > browser can support css and if not redirect to a different site. Does
> > anyone have sample code that does this?
> >
> > thx

> Do a quick Google for Browserhawk
>
> Bob Barrows
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>



 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-12-2005
Not that I know of.


AMC wrote:
> Thanks, but I've looked at Browserhawk, and I need to write this
> myself rather than purchase something, is there a list somewhere of
> browsers that don't support css?
>
> "Bob Barrows [MVP]" <(E-Mail Removed)> wrote in message
> news:eOBLNOO%(E-Mail Removed)...
>> AMC wrote:
>>> Hi,
>>>
>>> I need to code an asp based browser sniffer. It needs to detect if a
>>> browser can support css and if not redirect to a different site.
>>> Does anyone have sample code that does this?
>>>
>>> thx

>> Do a quick Google for Browserhawk
>>
>> Bob Barrows
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      01-12-2005
Gazing into my crystal ball I observed "AMC" <(E-Mail Removed)>
writing in news:#70j2JO#(E-Mail Removed):

><(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
>>
>> AMC wrote:
>> > Hi,
>> >
>> > I need to code an asp based browser sniffer. It needs to detect if a
>> > browser can support css and if not redirect to a different site.
>> > Does anyone have sample code that does this?

>>
>> Retrieve the version and type of the browser and redirect based on
>> those values.
>>

> Thanks, but how do I tell based on the version and type if css is
> supported?
>


You're probably worrying about older browsers like IE and Netscape 4,
right?

As long as your document can be read/accessed without a stylesheet, you can
just serve NS 4 plain text. The way to do this is to use an @media that is
not screen, like @media all, or you could combine both @media all and
@media screen in the same stylesheet and include styling for NS in the
@media screen section.

For IE, there are only a few things to remember:
1. IE does not recognize hover on any element other than A
2. IE does not recognize display:fixed because the only element that IE can
fix in the view port is the background of the body element.
3. IE does not do well with fonts in ems. Use percentages instead, and you
should be fine.

The other thing you need to do, if you are not already, is make sure that
you are using a Strict Document Type Declaration (DTD), which will force
compliant browsers (IE among them) into standards mode. However, doing so,
you must make sure the markup is valid, otherwise the browser will still go
into quirks mode and possibly make a mess of the invalid markup.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
Roland Hall
Guest
Posts: n/a
 
      01-13-2005
"AMC" wrote in message news:OI2ihXN%(E-Mail Removed)...

: I need to code an asp based browser sniffer. It needs to detect if a
browser
: can support css and if not redirect to a different site. Does anyone have
: sample code that does this?

ASP is server-side scripting. CSS is client-side and is rendered by the
user's browser. BrowserHawk I don't think determines CSS capabilities.

This article may help:
http://support.microsoft.com/default...b;en-us;272413

Which has a link to this to get an updated browscap.ini file:
http://www.cyscape.com/browscap/

However, the easiest way to test would be to set a style on your page and
test to see if it had been set.
http://kiddanger.com/lab/cssenabled.asp

If you are looking for certain CSS capabilities, then you'll need to test
for those specifically.

HTH...

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-13-2005
Roland Hall wrote:
> "AMC" wrote in message news:OI2ihXN%(E-Mail Removed)...
>
>> I need to code an asp based browser sniffer. It needs to detect if a
>> browser can support css and if not redirect to a different site.
>> Does anyone have sample code that does this?

>
> ASP is server-side scripting. CSS is client-side and is rendered by
> the user's browser. BrowserHawk I don't think determines CSS
> capabilities.


Using either an activex control or a class in .Net, it does report on this.
http://www.cyscape.com/docs/showhelp...eference_Guide


By suggesting the use of Browserhawk, I ws subtly hinting that this
capability could not be reliably determine in server-side code. Much too
subtly, i see now.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
Roland Hall
Guest
Posts: n/a
 
      01-13-2005
"Bob Barrows [MVP]" wrote in message
news:%23gljWqW%(E-Mail Removed)...
: Roland Hall wrote:
: > "AMC" wrote in message news:OI2ihXN%(E-Mail Removed)...
: >
: >> I need to code an asp based browser sniffer. It needs to detect if a
: >> browser can support css and if not redirect to a different site.
: >> Does anyone have sample code that does this?
: >
: > ASP is server-side scripting. CSS is client-side and is rendered by
: > the user's browser. BrowserHawk I don't think determines CSS
: > capabilities.
:
: Using either an activex control or a class in .Net, it does report on
this.
:
http://www.cyscape.com/docs/showhelp...eference_Guide

That topic doesn't appear to be available. I'm getting a 404.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
VoIP phone supports IAX2 and SIP,Supports Auto-provision! gery VOIP 1 12-05-2007 07:12 PM
VoIP phone supports IAX2 and SIP,Supports Auto-provision! gery VOIP 0 10-22-2007 03:28 AM
JS Detects Browser, Then Replaces Images/Code/CSS Amanda H. Javascript 4 02-11-2006 02:41 PM
Browser Detects - Layers, GetElement, All leemundie@gmail.com Javascript 2 06-16-2005 11:51 AM



Advertisments