542). Which is not a form of client-side storage?
[A]Web Databases
[B]FileSystem API
[C]Offline Web Applications
[D]Online Web Applications
Show Answer
Correct Answer: Online Web Applications
Notes:
Answer: d
Explanation: Client-side storage allows the creater to store data on the users system for faster loading of the website. The various forms of client-side storage are web databases, filesystem API, Offline web applications and cookies.
543). Which is the storage that allows the caching of web pages and their associated resources?
[A]Web Databases
[B] FileSystem API
[C]Offline Web Applications
[D]Cookies
Show Answer
Correct Answer: Offline Web Applications
Notes:
Answer: c
Explanation: HTML5 defines an “Offline Web Applications” API that allows the caching of web pages and their associated resources (scripts, CSS files, images, and so on). This is client-side storage for web applications themselves rather than just their data, and it allows web apps to install themselves so that they are available even when there is no connection to the Internet.
544). Which is Microsoft’s own proprietary client-side storage?
[A]IE User Data
[B] Offline Web Applications
[C]Cookies
[D] Offline Apis
Show Answer
Correct Answer: IE User Data
Notes:
Answer: a
Explanation: Microsoft implements its own proprietary client-side storage mechanism, known as “userData,” in IE5 and later. userData enables the storage of medium amounts of string data and can be used as an alternative to Web Storage in versions of IE before IE8. This makes loading of programs and software faster.
545). Which object supports Filesystem API?
[A]Element
[B]File
[C]Window
[D]DOM
Show Answer
Correct Answer: File
Notes:
Answer: b
Explanation: These objects can be obtained from the filesystem property on any file system entry. Some browsers offer additional APIs to create and manage file systems, such as Chrome’s requestFileSystem() method.
546). Which is the most appropriate database for developers requiring a huge amount of data?
[A]Database
[B]Datawarehouse
[C] Web databases
[D]Access
Show Answer
Correct Answer: Web databases
Notes:
Answer: c
Explanation: Developers who need to work with really huge amounts of data like to use databases, and the most recent browsers have started to integrate client-side database functionality into their browsers. Client data base helps in making the website faster and handling the data easier.
547). The localStorage and sessionStorage belongs to ___________
[A]Window object
[B] Element object
[C]Hash object
[D]DOM object
Show Answer
Correct Answer: Window object
Notes:
Answer: a
Explanation: Browsers that implement the “Web Storage” draft specification define two properties on the Window object: localStorage and sessionStorage. Local storage and Session storage are the web storage objects. Session storage is destroyed once the user closes the browser whereas, Local storage stores data with no expiration date.
548). What is the main difference between localStorage and sessionStorage?
[A]Lifetime
[B]Scope
[C]Both Lifetime and Scope
[D] Storage Location
Show Answer
Correct Answer: Both Lifetime and Scope
Notes:
Answer: c
Explanation: The difference between localStorage and sessionStorage has to do with lifetime and scope: how long the data is saved for and who the data is accessible to. Session storage is destroyed once the user closes the browser whereas, Local storage stores data with no expiration date.
549). What is the lifetime of the data stored through localStorage?
[A]Permanent
[B]Temporary
[C] Both Permanent and Temporary at times
[D] Cannot store
Show Answer
Correct Answer: Permanent
Notes:
Answer: a
Explanation: Data stored through localStorage is permanent. it does not expire and remains stored on the user’s computer until a web app deletes it or the user asks the browser (through some browser-specific UI) to delete it. This data is stored on the client side server and is used for faster access of data.
550). Which is the function used to retrieve a value?
[A]get()
[B] retrieve()
[C]getItem()
[D]retrieveItem()
Show Answer
Correct Answer: getItem()
Notes:
Answer: c
Explanation: To retrieve a value, pass the name to getItem(). The getItem() method of the Storage interface, when passed a key name, will return that key’s value, or null if the key does not exist, in the given Storage object.
551). Which is the function used to store a value?
[A]setItem()
[B] set()
[C]storeItem()
[D]store()
Show Answer
Correct Answer: setItem()
Notes:
Answer: a
Explanation: To store a value, pass the name and value to setItem(). The setItem() method of the Storage interface, when passed a key name and value, will add that key to the given Storage object, or update that key’s value if it already exists.
552). What will be the output of the following JavaScript code?
[A]Error
[B]Undefined
[C]Volvo
[D]Garbage value
Show Answer
Correct Answer: Volvo
Notes:
Answer: c
Explanation: A variable does not lose its value if it is re-declared. The Javascript variable will store the value and the output will be Volvo.
553). What will be the output of the following JavaScript code?
The result of adding "5" + 2 + 3:
[A]523
[B]10
[C]5
[D]Error
Show Answer
Correct Answer: 523
Notes:
Answer: a
Explanation: When a string and integer is added in Javascript then the resulting output is string. Javascript will type caste integer to string and would then concatenate to produce the output.
554). What will be the output of the following JavaScript code?
code
[A]Code
[B]CODE
[C]code
[D]Error
Show Answer
Correct Answer: CODE
Notes:
Answer: b
Explanation: toUpperCase function is present in the string Library of Javascript. It converts the string to uppercase.
555). What will be the output of the following JavaScript code?
[A]1
[B]0
[C]true
[D]undefined
Show Answer
Correct Answer: 1
Notes:
Answer: a
Explanation: The Number() method converts variables to numbers. True value is converted to 1 and a false value is converted to 0.
556). What will be the output of the following JavaScript code?
[A]two three
[B] one two
[C]one three
[D]error
Show Answer
Correct Answer: two three
Notes:
Answer: a
Explanation: The shift() method removes the first element of an array. It “shifts” all other elements to the left.