Hands-on Project 5-1


Question and Answer Section:


a. For each of the four properties (navigator.appName / appVersion / platform / userAgent), specify whether the information returned seems accurate.
- I tested this webpage on 3 different browsers: Edge, FireFox, and Chrome. So far, the information returned seems to be accurate with respect to the browser in which it was viewed.

b. Which of the properties are consistently different in each browser? Which of the properties, if any, are the same for each browser?
- The properties that are consistently different with regards to Edge, FireFox, and Chrome are: Web browser version (navigator.appVersion) and the user agent (navigator.userAgent). For example, in the Web browser version, all browsers returned the same version of 5.0, but there was more information in the Chrome and Edge browsers while FireFox only mentioned the version being 5.0 with nothing else added:
Chrome Web browser version: 5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
Edge Web browser version: 5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36 Edg/94.0.992.50
Firefox Web browser version: 5.0 (Windows)

- The properties that remained the same with regards to Edge, FireFox, and Chrome are: Web browser name (navigator.appName), which returned "Netscape", and the operating platform (navigator.platform), which returned Win32.

c. Based on your results, explain any challenges you see in using the properties of the Navigator object to tell which browser an app in open in. Also explain which property or properties would deliver useful information.
- The properties that pose the most challenge, I think, are the browser name and user agent (appName and userAgent respectively) as the browser name is the same for all browsers so it'd be impossible to tell which was which. Furthermore, the user agent property might be useful in identifying FireFox as the browser name is directly stated, but not so much with Chrome or Edge. The properties that would deliver useful information are the browser version and operating platform (appVersion and platform respectively), as knowing the browser version and operating platform can help with troubleshooting any issues that may arise and can also lend itself for compatibility when delivering updates.