HTML Questions & Answers – Application Cache and Cache Manifest File

This set of HTML Multiple Choice Questions & Answers (MCQs) focuses on “Application Cache and Cache Manifest File”.

1. Which of the following is not the benefit of cache application?
a) browsing offline
b) reduction of server load
c) speed
d) asynchronous
View Answer

Answer: d
Explanation: Application cache can be helpful in so many ways like we can browse offline, as the cached resources are at local level hence they load at faster speed, it also reduces the load of the server. Asynchronous is one of the problems with the use of application cache due to this the resources which are not required like JavaScript or images will also be downloaded.

2. Which line is mandatory in cache manifest file?
a) CACHE MANIFEST
b) CSS stylesheet
c) index.html
d) image address
View Answer

Answer: a
Explanation: For offline access, there is a text file named cache manifest. It lists the resources of the browser. For enabling application cache for any app we must include manifest attribute inside an html tag of the document like <html manifest=”text.appcache”> this manifest should be included on every page that we want cached.

3. Which is not the section of manifest?
a) network
b) cache
c) fallback
d) cache status
View Answer

Answer: d
Explanation: If the files are not in cache they come from a list of the files in the network. Cache is the default section. The files those are listed under this header are explicitly cached after downloading for the first time. If the resource is inaccessible then this section will be in use. There is no any rule to list these section, can be listed in any order.
advertisement
advertisement

4. Resources do not fit into _______
a) explicit entries
b) master entries
c) fallback entries
d) idle entries
View Answer

Answer: d
Explanation: The categories for the resources to fit in are explicit entries, master entries, network entries, fallback entries. Entry can be both fallback and explicit entry. Any HTML file that contains manifest attribute is a master entry. Explicit entries are listed explicitly in the cache section.

5. Which entry executes and load scripts from the server?
a) Explicit entry
b) Network entry
c) Fallback entry
d) Master entry
View Answer

Answer: b
Explanation: There are four types of resources in an application cache which are 1) Master Entries 2) Explicit Entries 3) Network Entries 4) Fallback Entries. Resources are explicitly listed in the application’s cache manifest file by the explicit entry. Fallback entry provides fallback entries in the application’s manifest file. Master entries are the resources added to the cache. Network entry executes and load scripts and code from the server, not from the cache. Syntax is
CACHE MANIFEST
NETWORK:
/api
Resources are explicitly listed in a cache in explicit entries. When attempt to load fails fallback entry is used.

6. Which of the following is not one of the cache state?
a) Downloading
b) Checking
c) Idle
d) Fallback
View Answer

Answer: d
Explanation: Updateready, obsolete, downloading, checking, idle, uncached are the states of cache. Downloading state of cache denotes that the resources are being downloaded. Checking state signifies that manifest is being checked for the updates. Idle state denotes that the cache is not currently active for the process to update.

7. When a new version of any cache is available which even is fired?
a) progress
b) updateready
c) checking
d) obsolete
View Answer

Answer: b
Explanation: When there is an availability of the new version of the cache updateready event is fired. When the resources are being downloaded then progress event is fired. Checking event is fired when an update is being checked. Obsolete is fired when the current cache is marked obsolete.
advertisement

8. If the transparent part of the image has rounded or diagonal edges, which format is suitable?
a) PNG
b) Transparent GIF
c) GIF
d) JPG
View Answer

Answer: a
Explanation: If a transparent part of the image has rounded or diagonal corners we use PNG format. If we want semi opaque transparency or drop shadow there also this format is helpful. If the transparent part of the image has straight edges we use transparent GIF format.

Sanfoundry Global Education & Learning Series – HTML.

advertisement

To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.