Javascript Multiple Choice Questions on “Performance Navigation and Memory – I”.
1. How many read-only attributes are present in the navigator object?
a) 1
b) 2
c) 3
d) 4
Answer: b
Clarification: The navigator object contains information about the browser. There are a total of 2 read-only attributes present in the navigator object namely:
redirectCount
type.
2. Why are HTTP redirects significant?
a) TCP connection available
b) Complete roundtrip absent
c) Complete roundtrip present
d) TCP connection not available
Answer: b
Clarification: HTTP redirects are significant because they cause a complete roundtrip for each redirect. The original request is returned from the web server as either a 301 or a 302 with the path to the new location.
3. Where does the DNS reply go to in a single HTTP redirect?
a) Browser
b) Client
c) Server
d) DNS Server
Answer: a
Clarification: DNS is a query/response protocol. The client queries information (for example the IP address corresponding to www.google.com) in a single UDP request. The DNS reply goes to the Browser in a single HTTP redirect.
4. How can one access the redirectCount property?
a) navigation.redirectCount
b) performance.navigation.redirectCount
c) performance.redirectCount
d) redirectCount
Answer: b
Clarification: The redirectCount property can be accessed as performance.navigation.redirectCount. The PerformanceNavigation.redirectCount read-only property returns an unsigned short representing the number of REDIRECTs done before reaching the page.
5. How many constant values can the property type be represented?
a) 2
b) 3
c) 4
d) 5
Answer: c
Clarification: The type property sets or returns the value of the type attribute of an