ExamVeda
Login
Home
21
What is the code snippet to go back to a history twice?
Discuss
Answer & Solution
Answer: Option C
Solution:
The above code snippet goes back 2, like clicking the Back button twice.
22
If the window has child windows, how will the browsing histories be affected?
Discuss
Answer & Solution
Answer: Option B
Solution:
If a window contains child windows, the browsing histories of the child windows are chronologically interleaved with the history of the main window.
23
The length property belongs to which of the following objects?
Discuss
Answer & Solution
Answer: Option C
Solution:
The length property of the History object specifies the number of elements in the browsing history list, but for security reasons scripts are not allowed to access the stored URLs.
24
What is the datatype of the go() method’s parameter?
Discuss
Answer & Solution
Answer: Option B
Solution:
The go() method takes an integer argument and can skip any number of pages forward and backward in the history list.
25
What is the special feature of the modern web applications?
Discuss
Answer & Solution
Answer: Option A
Solution:
Modern web applications can dynamically alter their own content without loading a new document.
26
The navigator property belongs to which of the following object?
Discuss
Answer & Solution
Answer: Option C
Solution:
The navigator property of a Window object refers to a Navigator object that contains browser vendor and version number information.
27
What is the vendor-neutral synonym for navigator?
Discuss
Answer & Solution
Answer: Option D
Solution:
IE supports clientInformation as a vendor-netural synonym for navigator.
28
Which is the preferred testing nowadays for scripting?
Discuss
Answer & Solution
Answer: Option B
Solution:
In the past, the Navigator object was commonly used by scripts to determine if they were running in Internet Explorer or Netscape. This “browser-sniffing” approach is problematic because it requires constant tweaking as new browsers and new versions of existing browsers are introduced. Today, feature testing is preferred: rather than making assumptions about particular browser versions and their features, you simply test for the feature (i.e., the method or property) you need.
29
Which of the below properties can be used for browser sniffing?
Discuss
Answer & Solution
Answer: Option C
Solution:
The platform and appVersion can be used for browser sniffing.
30
Where is the information of the userAgent property located?
Discuss
Answer & Solution
Answer: Option D
Solution:
The string that the browser sends in its USER-AGENT HTTP header. This property typically contains all the information in appVersion and may contain additional details as well. Like appVersion, there is no standard format. Since this property contains the most information, browser-sniffing code typically uses it.