Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recognizing the browser
Message
De
13/01/2015 09:13:36
 
 
À
13/01/2015 09:08:31
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01613449
Message ID:
01613508
Vues:
25
I'd rather send an AJAX POST request when document is ready with whatever browser feature server needs to know about

>>navigator.userAgent is no longer reliable (was it ever?)
>
>No - never was. But it's all we've got.
>
>>eg.
>>
>>1/ IE11/Win7:
>>navigator.userAgent = "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; Tablet PC 2.0; .NET4.0E; EIE10;FRFRWOL; rv:11.0) like Gecko"
>>doesn't even mention 'IE'
>
>I thought IE 11 always had 'MSIE 11' (and all earlier versions were also 'MSIE x.x' )?
>
>http://www.useragentstring.com/pages/Internet%20Explorer/
>
>>2/ http://api.jquery.com/jQuery.browser/: "The $.browser property is deprecated in jQuery 1.3, and its functionality may be moved to a team-supported plugin in a future release of jQuery."
>>
>>To detect browser features, modernizr.js is your friend - http://modernizr.com/
>
>On the client -yes. But this is about identifying the browser on the server side - .NET uses the useragent string and attempts to match it against a list of pre-defined definition files (but you can add your own). In the case in question (IE11) it returns 'Internet Explorer' as the browser property whereas, for earlier versions it returned "IE". In general it's of limited use but has a bunch of other properties which, in theory (:=}) gives some useful information (e.g. 'CanSendEmail', 'IsColor', 'IsMobileDevice')
>
>>>Don't believe that's true. The useragent string for IE11 shows 'MSIE 11'
>>>I think it's the .NET browser definition files that provide the HttpBrowserCapabilities.Browser string....
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform