PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Examples of browser names
  • Examples of browser names
  • Special case
  • Cached sessions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the name of the browser of the Web user ("user agent"). The browser name is returned by the navigation software of the Web user.
Example
WEBDEV - Server codePHPAjax
NameOfBrowser is string
NameOfBrowser = BrowserName()
IF Position(NameOfBrowser, "MSIE") <> 0 THEN
// The browser is Internet Explorer
ELSE
// The browser can be Netscape, Mozilla, Opera ...
END
NameOfBrowser is string
NameOfBrowser = BrowserName()
IF Position(NameOfBrowser, "MSIE") <> 0 THEN
// The browser is Internet Explorer
ELSE
// The browser can be Netscape, Mozilla, Opera ...
END
WEBDEV - Browser code
IF BrowserName() ~= "Microsoft Internet Explorer" THEN
// The browser is Internet Explorer
ELSE
// The browser can be Netscape, Mozilla, Opera ...
END
Syntax
<Result> = BrowserName()
<Result>: Character string
Name of the browser of the Web user.
Remarks
WEBDEV - Server codePHPAjax

Examples of browser names

The name returned changes according to the version and to the browser. Some examples of names returned for the most common browsers:
  • Internet Explorer 6:
    • example of name returned in server code: Mozilla/4.0 (compatible;MSIE 6.0;Windows NT 5.1;SV1;.NET CLR 1.1.4322)
    • example of name returned in browser code: Microsoft Internet Explorer
  • Internet Explorer 7:
    • example of name returned in server code: Mozilla/4.0 (compatible;MSIE 7.0;Windows NT 5.1;SV1;.NET CLR 1.1.4322)
    • example of name returned in browser code: Microsoft Internet Explorer
  • Internet Explorer 8:
    • example of name returned in server code: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    • example of name returned in browser code: Microsoft Internet Explorer
  • Internet Explorer on Windows Mobile 6:
    • example of name returned in server code: PPC; 240x320; HTC_P3450/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.6)
    • example of name returned in browser code: ""
  • FireFox 1.0:
    • example of name returned in server code: Mozilla/5.0 (Windows;U;Windows NT 5.1;en-US;rv:1.7.12) Gecko/20050915 Firefox/1.0.7
    • example of name returned in browser code: Netscape
  • FireFox 1.5:
    • example of name returned in server code: Mozilla/5.0 (Windows;U;Windows NT 5.1;fr;rv:1.8.0.12) Gecko/20050915 Firefox/1.5.0.12
    • example of name returned in browser code: Netscape
  • FireFox 2.0:
    • example of name returned in server code: Mozilla/5.0 (Windows;U;Windows NT 5.1;en-US;rv:1.8.1.4) Gecko/20050915 Firefox/2.0.0.4
    • example of name returned in browser code: Netscape
  • Opera:
    • example of name returned in server code: Opera/9.20 (Windows NT 5.1;U;fr)
    • example of name returned in browser code: Opera
  • Opera on Windows Mobile 6:
    • example of name returned in server code: Opera/9.7 (Windows Mobile; PPC; Opera Mobi/35166; U; en) Presto/2.2.1
    • example of name returned in browser code: Opera
  • Netscape 6:
    • example of name returned in server code: Mozilla/5.0 (Windows;U;Windows NT 5.0;en-US;rm18) Gecko/20001108 Netscape6/6.0
    • example of name returned in browser code: Netscape
  • Google Chrome 3 (Windows version):
    • example of name returned in server code: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.27 Safari/532.0
    • example of name returned in browser code: Netscape
  • Safari 4 (Windows version):
    • example of name returned in server code: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17
    • example of name returned in browser code: Netscape
  • Safari on iPhone:
    • example of name returned in server code: Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1 like Mac OS X; fr-fr) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7C144 Safari/528.16
    • example of name returned in browser code: Netscape

Examples of browser names

The name returned changes according to the version and to the browser. Some examples of names returned for the most common browsers:
  • Internet Explorer 6: Mozilla/4.0 (compatible;MSIE 6.0;Windows NT 5.1;SV1;.NET CLR 1.1.4322)
  • Internet Explorer 11: Mozilla/5.0 (Windows NT 6.1; Win64; x64; Trident/7.0; rv:11.0) like Gecko
  • Edge on Windows 10: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
  • Edge on Windows 10 Mobile: Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; NOKIA; Lumia 1320) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10581
  • FireFox 44.0: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0"
  • Google Chrome 47 (Windows version): Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.58 Safari/537.36
  • Safari (MacOS version): Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7
  • Safari on iPhone: Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1

Special case

In Internet Explorer 11, BrowserName operates properly only if the page is in HTML 4 format without reference to the DTD file.
Versions 20 and later

Cached sessions

If your project is using cached sessions, this function must not be used in the "Initializing the project" process. This function must be used in the "Initializing the project after connection to the site" process.
New in version 20

Cached sessions

If your project is using cached sessions, this function must not be used in the "Initializing the project" process. This function must be used in the "Initializing the project after connection to the site" process.

Cached sessions

If your project is using cached sessions, this function must not be used in the "Initializing the project" process. This function must be used in the "Initializing the project after connection to the site" process.
Components
WEBDEV - Server code wd230page.dll
WEBDEV - Browser code WDJS.DLL
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment