Test Series - html

Test Number 44/72

Q: Major portion of web page contributes _________________
A. image
B. text
C. video
D. audio
Solution: 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.
Q: For image compression which tool is helpful?
A. WordPress cache enable a plugin
B. Optimus wordpress plugin
C. Glup-uglify
D. Speed test tool
Solution: 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.
Q: HTTP request is between _______________
A. client and host
B. client and server
C. server and host
D. user and server
Solution: 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.
Q: 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
Solution: 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);
Q: Which of the following is not render blocking resource?
A. CSS
B. HTML
C. JavaScript
D. Jquery
Solution: 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.
Q: 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
Solution: 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  tag. CSS code should be at the beginning of the code.
Q: 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
Solution: 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.
Q: 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
Solution: 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.
Q: 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
Solution: 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.
Q: 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
Solution: 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.

You Have Score    /10