473,761 Members | 5,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp based browser sniffer that detects if browser supports css

AMC
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

Jul 22 '05 #1
12 2039

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.

Jul 22 '05 #2
AMC
Thanks, but how do I tell based on the version and type if css is supported?

<la**********@y ahoo.com> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.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.

Jul 22 '05 #3
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"
Jul 22 '05 #4
AMC
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]" <re******@NOyah oo.SPAMcom> wrote in message
news:eO******** ********@tk2msf tngp13.phx.gbl. ..
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"

Jul 22 '05 #5
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]" <re******@NOyah oo.SPAMcom> wrote in message
news:eO******** ********@tk2msf tngp13.phx.gbl. ..
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"
Jul 22 '05 #6
Gazing into my crystal ball I observed "AMC" <ab*****@netgat e.net>
writing in news:#7******** ******@TK2MSFTN GP09.phx.gbl:
<la**********@ yahoo.com> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.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
Jul 22 '05 #7
"AMC" wrote in message news:OI******** ********@TK2MSF TNGP09.phx.gbl. ..

: 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
Jul 22 '05 #8
Roland Hall wrote:
"AMC" wrote in message news:OI******** ********@TK2MSF TNGP09.phx.gbl. ..
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"
Jul 22 '05 #9
"Bob Barrows [MVP]" wrote in message
news:%2******** **********@tk2m sftngp13.phx.gb l...
: Roland Hall wrote:
: > "AMC" wrote in message news:OI******** ********@TK2MSF TNGP09.phx.gbl. ..
: >
: >> 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
Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2219
by: Stephan | last post by:
Hello to all, I'm looking into providing mobile access to a web based administrative application currently running on .Net with MS SQL. The current architecture only supports the latest Internet Explorer browser due to elaborate dependencies on client side XML libraries, so I'm told. My problem is lack of knowledge of mobile client capabilities. I need insight into which architecture to use, more on this follows. The requirements for...
13
2081
by: AMC | last post by:
Hi, I have the below code in an asp page. When I run this page in IE or Opera it correctly displays the header info and does not redirect me to 'test.html'. However, when I run this in Netscape it goes straight to the redirect page 'test.html' which indicates that javascript is not enabled and it also does not display the header info. Can someone tell me why this is happening? <%@ Language=VBScript%> <%'get header info
4
3403
by: _max_ | last post by:
HttpWebRequest() allows 'pseudo-browser' simulation to intercept incoming HTML for 'screen scraping', etc. But how would you do the opposite: Programmatically find out what a browser is sending to a website? (Probably via POST) I'd imagine this is done often, so maybe I'm just missing some terminology for doing the search. It seems you'd also have to simulate cookies to do this right. Is code available?
5
3176
by: David Baker | last post by:
Hi all I am very new to ASP.Net. I am trying to create a sniffer for our program. We want our users to click our sniffer and hopefully the sniffer will check their computer against our requirements. I would like to ask experts like you to see which items are actually doable with ASP.Net. Below I listed all of the items we are looking for but I can understand if some of the items are impossible to check/sniff. We would like to create a sniffer...
1
2673
by: Peter Larsson | last post by:
Hi there, I'm creating an advertisement system that will have several Flash animations to be displayed. However, I'm looking for a way to check if the visitor's browser supports displaying Flash. The purpose is to be able to programmatically display a regular GIF version of the advertisement instead if the browser does not support Flash. I know that several other sites have this functionality, but is it something that ASP.NET can take...
2
1240
by: Prasad Dannani | last post by:
Hi, I want to know the browser settings like Image Enabled, Cookie Enabled etc., For Cookies and Script Request object has some properties but after disabling certain features also we are getting the same results. Please help on the way of tracking the image disabled option ASAP.
1
1873
by: Dave Harrington | last post by:
Greetings all - We have a client who uses Lotus Notes as their default e-mail. The version of Lotus they use can run internet explorer windows within Lotus. I'd like to find if they are launching our web application through lotus notes or not. I've stumbled across the following code: private void Button1_Click(object sender, System.EventArgs e)
16
2360
by: petermichaux | last post by:
Hi, Does anyone have a a cross-browser setOpacity function that does not use browser sniffing? I looked at the Yahoo! UI function and it detects IE by looking for window.ActiveXObject. I also looked at Scriptaculous and it uses navigator.userAgent. Thanks, Peter
3
7789
by: =?Utf-8?B?Qkw=?= | last post by:
if (Request.Browser.Cookies) { // Cookies supported } else { // Web browser not supports cookies }
0
9538
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9353
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9909
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9788
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7342
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6623
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5241
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.