Correct Answer: - A web worker is a JavaScript which runs in the background It exists in external files - It is independent of other scripts and does not affect the performance of the page - Web workers are usually used for CPU intensive tasks
Correct Answer: A Manifest file is a simple text file that tells the browser what to cache and what not to cache There are three sections of a Manifest file: i) CACHE MANIFEST - Files listed here are cached after they are downloaded for the first time ii) NETWORK - Files listed here require a connection to the server, and are never cached iii) FALLBACK - Files listed here specify fallback pages if a page is inaccessible
3. What is the concept of Application Cache in HTML5? What are its advantages?
Correct Answer: The Application Cache concept introduced by HTML5 means that a web application is cached, and accessible without an internet connection There are three advantages of Application Cache: 1Offline browsing - users can use the application when they're offline 2Speed - cached resources load faster 3Reduced server load - the browser will only download updated/changed resources from the server
4. Differentiate between localStorage and sessionStorage objects.
Correct Answer: - localStorage object stores the data without an expiry date while sessionStorage object stores the data only for one session - With localStorage object, data will not be deleted when the browser window is closed while the data is deleted when the browser window closes with sessionStorage objects
Correct Answer: With HTML5, it is possible for the web pages to store the data locally in the user's browser This web storage is much faster and secured than the cookies Also, a larger amount of data can be stored without causing any adverse effect to the performance of the website The data here is not included with every server request It is used ONLY when it is asked for It is only that particular web page that can access the data stored by itself
6. What are the new attributes provided in HTML5 for "form" tag ?
Correct Answer: - Yes, HTML 5 can get the location of a user with the use of Geolocation API - Use getCurrentPosition() method to get the user?s current position
8. HTML 5 provides drag and drop facility. How do you make an image draggable?