Using the userAgent PropertyThe most comprehensive information you can get about a browser is usually to be found in the navigator.userAgent property. Unfortunately, this string is not standardized, so you must search for the information you want using the JavaScript string methods (which we'll discuss in Chapter 18, "The Date , Time , and String Objects"). Here are a few possible values for this string and what they meannote that they always start with "Mozilla" because in the early days, scripts used to search for that word before assuming standard JavaScript compatibility:
To get what you want from the userAgent property, you have to search for itsee the next topic. |