Each question below shows the correct answer with a full explanation. Use these to build conceptual understanding before attempting a timed quiz.
Web Performance & OptimizationEasy
Q1. What is web performance optimization?
- A.A CSS framework for building optimized page layouts
- B.A JavaScript library for animation performance
- C.Making websites look visually better with design
- D.Techniques to make websites load and respond faster✓ Correct
Explanation
Web performance optimization reduces load times and improves responsiveness.
Report an error in this question
Web Performance & OptimizationEasy
Q2. What is caching?
- A.Storing data copies for faster subsequent access✓ Correct
- B.A type of database for key-value storage
- C.A payment method for online transactions
- D.A CSS property for visual element styling
Explanation
Caching stores copies of resources for faster future access.
Report an error in this question
Web Performance & OptimizationEasy
Q3. What is image compression?
- A.Permanently deleting images from the server
- B.Reducing image file size while keeping quality✓ Correct
- C.A JavaScript function for image manipulation
- D.A CSS filter for applying visual image effects
Explanation
Image compression reduces file sizes to decrease page load time.
Report an error in this question
Web Performance & OptimizationEasy
Q4. What is minification?
- A.A CSS technique for reducing selector specificity
- B.Making fonts smaller on the rendered page
- C.Removing unnecessary characters without changing function✓ Correct
- D.A database optimization for reducing table sizes
Explanation
Minification removes whitespace, comments, and shortens names to reduce file sizes.
Report an error in this question
Web Performance & OptimizationEasy
Q5. What is lazy loading?
- A.A database query that runs in the background
- B.A CSS animation with a slow timing function
- C.Deferring non-critical resource loading until needed✓ Correct
- D.Loading pages intentionally at a slower speed
Explanation
Lazy loading delays loading resources until they enter the viewport.
Report an error in this question
Web Performance & OptimizationEasy
Q6. What is a CDN used for in web performance?
- A.A database network for distributed data storage
- B.Creating dynamically generated HTML pages
- C.Distributing content across global servers for speed✓ Correct
- D.A CSS framework for building responsive layouts
Explanation
A CDN caches content worldwide, serving from the nearest location.
Report an error in this question
Web Performance & OptimizationEasy
Q7. Why are large images bad for web performance?
- A.They look bad on high-resolution displays
- B.They break CSS layouts on mobile devices
- C.They increase page load time and bandwidth use✓ Correct
- D.They cause JavaScript runtime errors in browsers
Explanation
Large images slow page loads and consume more bandwidth.
Report an error in this question
Web Performance & OptimizationEasy
Q8. What is page load time?
- A.A server uptime metric for availability
- B.The time to write the application code
- C.The total time for a web page to fully load✓ Correct
- D.A CSS duration for transition animations
Explanation
Page load time measures how long it takes for a page to fully render.
Report an error in this question
Web Performance & OptimizationEasy
Q9. What does the async attribute do on a script tag?
- A.Makes CSS load asynchronously in parallel
- B.Downloads script without blocking HTML parsing✓ Correct
- C.Makes the script execute synchronously in order
- D.Delays the script loading permanently from page
Explanation
async downloads the script without blocking and executes it immediately upon download.
Report an error in this question
Web Performance & OptimizationEasy
Q10. What is browser caching?
- A.Storing resources locally for faster repeat access✓ Correct
- B.A JavaScript method for storing session data
- C.A CSS property for caching computed style values
- D.A browser plugin for extending capabilities
Explanation
Browser caching stores files locally so repeat visits load faster.
Report an error in this question
Web Performance & OptimizationMedium
Q11. What is the difference between FCP and LCP?
- A.LCP measures only the first pixel painted on screen
- B.FCP is always slower than LCP in page loading time
- C.FCP is when first content appears; LCP is when largest renders✓ Correct
- D.They are identical metrics measuring the same event
Explanation
FCP measures first content render, while LCP measures the largest visible element render.
Report an error in this question
Web Performance & OptimizationMedium
Q12. What is code splitting?
- A.Breaking JavaScript bundles into on-demand chunks✓ Correct
- B.Dividing CSS files into smaller partial imports
- C.Database partitioning for distributing table rows
- D.Splitting HTML files across different server endpoints
Explanation
Code splitting divides code into smaller bundles loaded only when needed.
Report an error in this question
Web Performance & OptimizationMedium
Q13. What is the purpose of loading='lazy' on images?
- A.To defer loading off-screen images until scrolled to✓ Correct
- B.To load images using CSS background properties
- C.To compress images for smaller file sizes
- D.To slow down image rendering on the page
Explanation
loading='lazy' defers loading images outside the viewport.
Report an error in this question
Web Performance & OptimizationMedium
Q14. What is GZIP compression?
- A.A JavaScript minifier for reducing bundle sizes
- B.A CSS compression tool for minifying stylesheets
- C.Image compression for reducing file sizes
- D.A server-side method reducing transferred file sizes✓ Correct
Explanation
GZIP compresses text-based files before sending them to the client.
Report an error in this question
Web Performance & OptimizationMedium
Q15. What are Core Web Vitals?
- A.A CSS framework for building optimized page layouts
- B.A testing tool for measuring code quality metrics
- C.Google metrics for UX: LCP, INP, and CLS scores✓ Correct
- D.Core JavaScript functions built into the language
Explanation
Core Web Vitals measure loading (LCP), interactivity (INP), and visual stability (CLS).
Report an error in this question
Web Performance & OptimizationMedium
Q16. What is render-blocking CSS?
- A.CSS that blocks images from loading on page
- B.CSS that blocks JavaScript from executing code
- C.CSS preventing rendering until fully downloaded✓ Correct
- D.CSS that blocks individual element visibility
Explanation
Render-blocking CSS delays rendering because the browser must parse all CSS first.
Report an error in this question
Web Performance & OptimizationMedium
Q17. What is prefetching?
- A.A CSS property for preloading font resources
- B.A JavaScript fetch method for making API requests
- C.Fetching data from databases in advance
- D.Loading resources in advance the user will likely need✓ Correct
Explanation
Prefetching downloads resources before they are needed.
Report an error in this question
Web Performance & OptimizationMedium
Q18. What is Cumulative Layout Shift (CLS)?
- A.A CSS layout property for element positioning
- B.A database migration for moving records between tables
- C.A metric measuring unexpected visual shifts during loading✓ Correct
- D.A JavaScript shift operation for bitwise manipulation
Explanation
CLS measures the total of all unexpected layout shifts during the page lifecycle.
Report an error in this question
Web Performance & OptimizationMedium
Q19. What is the purpose of a service worker in performance?
- A.To minify JavaScript bundles for production
- B.To manage CSS stylesheets and style rules
- C.To compress images for reduced file sizes
- D.To cache assets and serve them offline for speed✓ Correct
Explanation
Service workers intercept network requests and serve cached responses.
Report an error in this question
Web Performance & OptimizationMedium
Q20. What is tree shaking?
- A.A CSS technique for optimizing selector performance
- B.Removing tree images from web page content
- C.Eliminating unused code from JavaScript bundles✓ Correct
- D.A database optimization for removing unused indexes
Explanation
Tree shaking removes dead code from the final bundle.
Report an error in this question
Web Performance & OptimizationHard
Q21. What is the difference between preload, prefetch, and preconnect?
- A.They are identical in resource loading behavior
- B.Prefetch is exclusively used for CSS stylesheet resources only
- C.Preconnect downloads files from the server in advance before needed
- D.Preload fetches current-page resources; prefetch loads future; preconnect opens connections✓ Correct
Explanation
Preload is for current page, prefetch for future navigations, preconnect for early connections.
Report an error in this question
Web Performance & OptimizationHard
Q22. What is the PRPL pattern?
- A.A CSS color pattern for theming web pages
- B.Push, Render, Pre-cache, Lazy-load for delivery✓ Correct
- C.A database pattern for query optimization strategies
- D.A JavaScript design pattern for state management
Explanation
PRPL stands for Push, Render, Pre-cache, and Lazy-load.
Report an error in this question
Web Performance & OptimizationHard
Q23. What is the purpose of requestAnimationFrame?
- A.To request data from REST API server endpoints
- B.To request images from a remote CDN server
- C.To schedule animations synced with the repaint cycle✓ Correct
- D.To create CSS animations using keyframe declarations
Explanation
requestAnimationFrame syncs JavaScript animations with the browser's refresh rate.
Report an error in this question
Web Performance & OptimizationHard
Q24. What is the impact of the critical rendering path on performance?
- A.No impact on web application performance at all
- B.It determines how quickly a page becomes visible✓ Correct
- C.It only affects how CSS styles are calculated
- D.It only affects how images are decoded and shown
Explanation
The critical rendering path determines initial render speed.
Report an error in this question
Web Performance & OptimizationHard
Q25. What is HTTP/2 Server Push?
- A.A WebSocket feature for real-time data streaming
- B.A database push operation for replication updates
- C.Proactively sending resources before they are requested✓ Correct
- D.Pushing CSS stylesheets to the client browser
Explanation
HTTP/2 Server Push sends resources to the client before the browser requests them.
Report an error in this question
Web Performance & OptimizationHard
Q26. What is the difference between synthetic and real user monitoring?
- A.They are identical monitoring approaches
- B.Synthetic uses simulated tests; RUM collects real user data✓ Correct
- C.Synthetic monitoring collects data from actual users
- D.RUM uses simulated automated tests in lab environments
Explanation
Synthetic runs automated tests, while RUM collects data from actual user sessions.
Report an error in this question
Web Performance & OptimizationHard
Q27. What is layout thrashing?
- A.A JavaScript error from undefined variable references
- B.A CSS bug causing layout calculation errors
- C.Forcing repeated layout recalculations by reading/writing DOM✓ Correct
- D.A database deadlock from concurrent transaction conflicts
Explanation
Layout thrashing occurs when JavaScript repeatedly reads layout properties then modifies the DOM.
Report an error in this question
Web Performance & OptimizationHard
Q28. What is the purpose of resource hints in HTML?
- A.To add HTML comments for developer documentation
- B.To create resource files for internationalization support
- C.To inform the browser about resources to preload or prefetch✓ Correct
- D.To add tooltip text to page elements on hover
Explanation
Resource hints help the browser prioritize and fetch resources early.
Report an error in this question
Web Performance & OptimizationHard
Q29. What is the benefit of WebP or AVIF image formats?
- A.Better CSS support across all web browsers
- B.Better database storage efficiency for images
- C.Better JavaScript integration with image APIs
- D.Significantly smaller file sizes than JPEG/PNG✓ Correct
Explanation
WebP and AVIF achieve 25-50% smaller file sizes than JPEG/PNG.
Report an error in this question
Web Performance & OptimizationHard
Q30. What is Time to Interactive (TTI)?
- A.A CSS animation duration for transition effects
- B.The time until the page is fully interactive✓ Correct
- C.A server response time for processing API requests
- D.The time to write the application source code
Explanation
TTI measures when the page becomes truly usable and responsive to input.
Report an error in this question