This set of HTML Multiple Choice Questions & Answers (MCQs) focuses on “Web Performance Optimization – 1”.
1. Major portion of web page contributes _________________
a) image
b) text
c) video
d) audio
View Answer
Explanation: 64% of any website’s page is made up of images. The loading speed of the websites also slows down due to this much contribution of images in a web page. To reduce this loading time we use web performance optimization.
2. For image compression which tool is helpful?
a) WordPress cache enable a plugin
b) Optimus wordpress plugin
c) Glup-uglify
d) Speed test tool
View Answer
Explanation: Optimus WordPress plugin is used for lossless as well as lossy image compression. It automatically reduces the size of the file. Reduction in size is possible up to 70%. There are three versions of Optimus i.e. Optimus HQ, Optimus, Optimus HQ PRO. Speed test tools are used to measure/note down your pages speed performance. WordPress cache enable a plugin used to enable caching.
3. HTTP request is between _______________
a) client and host
b) client and server
c) server and host
d) user and server
View Answer
Explanation: HTTP stands for Hypertext Transfer Protocol. For fetching, data from server browser uses HTTP request, and in between client and host. The more HTTP request slower the loading of a page will be.
4. What does not come under minification?
a) removal of comments
b) removal of new line characters
c) removal of white space characters
d) removal of multimedia elements
View Answer
Explanation: For better web performance we use removal of unnecessary characters from the source code like white space characters, comments, new line characters, block delimiters etc.
E.g. the given JavaScript code var arr=[]; for(var i=0;i<10;i++) {arr[i]=i}; } is equivalent to the code for(var arr=[i=0];++i<10;arr[i]=i);
5. Which of the following is not render blocking resource?
a) CSS
b) HTML
c) JavaScript
d) Jquery
View Answer
Explanation: HTML, CSS and JavaScript are render blocking resources to the DOM. To enhance the speed of your web page these resources should be properly used.
6. For best speed position of JavaScript code should be at ______________
a) top of the code
b) bottom of the code
c) middle of the code
d) anywhere in the code
View Answer
Explanation: For better loading time of the page it is always recommended to put JavaScript code at the bottom of the main code of the page before </body> tag. CSS code should be at the beginning of the code.
7. What is the work of TTFB?
a) measures the responsiveness of web server
b) increases the load speed of web page
c) compresses the image
d) remove unnecessary characters
View Answer
Explanation: TTFB stands for time to the first byte and measures the responsiveness of server. Its calculation is done as: process request time+ HTTP request time+ HTTP response time. This speed up the website by downloading various smaller images through sockets.
8. 404 HTTP error is generated due to ____________
a) missing JavaScript file
b) any missing file
c) slow loading of the web page
d) on removing the newline character
View Answer
Explanation: HTTP 404 is an error which indicates that the client was able to communicate with the server but the server could not find the request. Due to missing of any file 404 error is generated, this is a taxing error for the page.
9. What is the work of Gzip compression?
a) compresses an image
b) compresses web pages only
c) compresses JavaScript and CSS code only
d) compresses web pages, JavaScript and CSS
View Answer
Explanation: Basically Gzip compression is used to compress text data in websites. Gzip compression is very useful in web performance optimization. It compresses web pages, JavaScript and CSS. Gzip is also one of the file formats. Gzip compression can be enabled via webserver configuration. Common webservers where it can me make enable is .htaccess, Nginx, Apache and Litspeed.
10. What is hotlink protection?
a) stopping other sites from displaying images
b) stopping other sites from displaying videos
c) stopping access of source code
d) compresses an image
View Answer
Explanation: Hotlink protection is a kind of tool. Hotlink protection is related to restricting HTTP, it stops other sites from displaying images of your webpage. We can create a list of hostnames that can access the resources of our website.
11. For best speed position of CSS code should be at __________
a) at the bottom of the code
b) at the middle of the code
c) at the top of the code
d) anywhere in the code
View Answer
Explanation: CSS styling and code should be placed at the top of the code for best loading result of the webpage. JavaScript code should be placed at the bottom of the page for best performance and rapid loading speed of the website.
12. What is not the work of database optimization?
a) cleaning out old tables
b) creating indexes
c) optimize datatype
d) delete database
View Answer
Explanation: We store various information in the database. A database is a collection of tables that contain information. Database delay takes a long waiting time, so there are various techniques for database optimization. Database optimization basically optimizes data types, tables, data size.
13. Which of the following is the Waterfall tool?
a) WebPageTest.org
b) dotcom-monitor
c) Pingdom Speed Test
d) GTmetrix
View Answer
Explanation: Waterfall views are useful for front end of the websites. These are the kind of graphs which shows the order of requesting of resources from a browser. One of the best online tools is WebPageTest.org also known as WPT.
14. Which of the following is not the layer of the OSI Model?
a) Transport Layer
b) Network Layer
c) Session Layer
d) Atomic Layer
View Answer
Explanation: OSI model stands for Open Systems Interconnection model. It is commonly used for representing various parts of network traffic. There are seven layers in the OSI model, Physical Layer, Data Link layer, Network Layer, Transport Layer, Session Layer, Presentation Layer and Application Layer.
15. Which browser gives maximum parallel connections per host?
a) Opera 10
b) Chrome 1 and 2
c) Safari 3 and 4
d) Firefox 3
View Answer
Explanation: Parallel downloading is very beneficial to performance. Opera 10 provides the maximum parallel connections per host i.e. 8, Chrome 1 and 2, Chrome 4 to 23 gives 6 maximum parallel connections per host, Safari 3 and 4 gives 4 maximum parallel connections per host, Firefox 3, Firefox 4 to 17 gives 6 maximum parallel connections per host.
Sanfoundry Global Education & Learning Series – HTML.
To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Apply for Computer Science Internship
- Practice MCA MCQs
- Practice Computer Science MCQs
- Check HTML Books
- Practice Information Science MCQs