NEW
Font size
WorksheetsMastering Web Performance Optimization
Total questions: 20
Worksheet time: 10mins
What is a cache strategy and why is it important?
A cache strategy is only relevant for database management.
A cache strategy is important because it optimizes data access speed and resource utilization, leading to improved application performance.
A cache strategy is used to store data permanently.
A cache strategy is a method for data encryption.
Name three common cache strategies used in web performance.
Database indexing
Browser caching, CDN caching, Server-side caching
Data encryption
Load balancing
What is the purpose of CSS optimization in web development?
To reduce the number of CSS rules for easier maintenance.
To add more colors and fonts to the website design.
The purpose of CSS optimization in web development is to enhance performance and loading speed.
To increase the size of CSS files for better organization.
List two techniques for optimizing CSS files.
Using CSS preprocessors
Adding comments in CSS
Minification and combining CSS files.
Using inline styles
What are the key principles of responsive design?
Key principles of responsive design include fluid grids, flexible images, and media queries.
CSS animations
Fixed images
Static layouts
How does media queries contribute to responsive design?
Media queries are irrelevant for modern web development.
Media queries are used to create animations in web design.
Media queries enable responsive design by applying styles based on device characteristics, allowing layouts to adapt to different screen sizes.
Media queries only affect text size on mobile devices.
What is a service worker and what role does it play in web performance?
A service worker is a type of web server that hosts websites.
A service worker is a tool for optimizing server-side code.
A service worker is a plugin that enhances browser security.
A service worker is a background script that improves web performance by caching resources and enabling offline functionality.
Explain how service workers can improve offline capabilities.
Service workers only work when the network is available.
Service workers improve offline capabilities by increasing server response times.
Service workers can only cache images, not other resources.
Service workers improve offline capabilities by caching resources and serving them when the network is unavailable.
What are the main features of HTTP/2 that enhance performance?
Content delivery networks, image optimization, and lazy loading.
Asynchronous loading, client-side caching, and SSL termination.
Persistent connections, cookie management, and DNS prefetching.
Multiplexing, header compression, and server push.
How does multiplexing in HTTP/2 improve loading times?
Multiplexing in HTTP/2 limits requests to one at a time, increasing loading times.
Multiplexing in HTTP/2 improves loading times by allowing multiple simultaneous requests and responses over a single connection, reducing latency and enabling parallel resource loading.
HTTP/2 multiplexing requires multiple connections for each resource, slowing down loading.
Multiplexing in HTTP/2 only works for images, not for other types of resources.
What tools can be used for performance testing of websites?
Microsoft Word
Photoshop
Some popular tools for performance testing of websites include JMeter, LoadRunner, Gatling, Apache Bench, and WebPageTest.
AutoCAD
Name two popular tools for measuring web performance.
Google PageSpeed Insights, GTmetrix
Pingdom Tools
Lighthouse
WebPageTest
What is the significance of minimizing HTTP requests in web optimization?
Minimizing HTTP requests improves website performance and user experience by reducing load times.
Minimizing HTTP requests increases server load and response time.
Reducing HTTP requests has no impact on user experience.
Minimizing HTTP requests is only relevant for mobile devices.
How can image optimization affect website performance?
Image optimization improves website performance by reducing load times and enhancing user experience.
Image optimization increases file sizes and slows down loading.
Image optimization only affects mobile devices and not desktops.
Image optimization has no impact on website performance.
What is critical CSS and how does it improve page load speed?
Critical CSS is the practice of inlining essential CSS for above-the-fold content to improve page load speed.
Critical CSS is a method for compressing images to speed up loading.
Critical CSS refers to the use of server-side rendering for faster page loads.
Critical CSS is a JavaScript library for enhancing animations.
Describe the concept of lazy loading in web development.
Lazy loading is used to preload all images and scripts before the user interacts with the page.
Lazy loading is a technique that loads all resources at once for faster access.
Lazy loading is a method to compress images and scripts to reduce their size before loading.
Lazy loading defers loading of images, scripts, or other resources until they are required, enhancing performance and user experience.
How can browser caching be configured for static assets?
Configure HTTP headers like 'Cache-Control' and 'Expires' for static assets.
Enable cookies for caching static assets.
Set 'Cache-Control' to 'no-store' for all assets.
Use 'Content-Disposition' header for static assets.
What is the difference between server-side and client-side caching?
Client-side caching is used for database management.
Server-side caching is faster than client-side caching.
Server-side caching is managed by the server, while client-side caching is managed by the user's browser or device.
Server-side caching is only for static content.
How does HTTP/2 handle header compression?
HTTP/2 compresses headers using gzip compression only.
HTTP/2 handles header compression by sending headers in plain text.
HTTP/2 handles header compression using HPACK, which compresses headers by referencing previously sent headers and using a dynamic table.
HTTP/2 does not use any form of header compression.
What role does a Content Delivery Network (CDN) play in web performance?
A CDN enhances web performance by reducing latency and improving load times through geographic distribution of content.
A CDN only serves static content without any impact on dynamic content.
A CDN decreases web performance by increasing latency and load times.
A CDN is primarily used for data storage and backup solutions.
