- Performance
- Accessibility
- Compatibility
- Localization & Internationalization
- Maintainability
- Scalability
- Security
- Availability
- TTFB (Time to First Byte)
- TTFP (Time to First Pixel)
- FCP (First Contentful Paint)
- LCP (Largest Contentful Paint)
- CLS (Cummulative Layout Shift)
- TIFC (Time to First Complete)
- FID (First Input Delay)
- WCAG 2.1 AA (text contrast, keyboard navigation & screen reader support)
- Keyboard navigation success rate
- Screen reader score (NVDA, JAWS)
- Color contrast (4.5:1 for normal text, 3:1 for large text)
- Alt text coverage
- Form & ARIA score
- All devices should work
- CSS and JS compatibility index
- RTL
- internationalization (i18n)
- i18next, react-intl, vue-i18n (APIs: (e.g., t('key')))
- Code modularity
- Documentation
- Testing
- Error handling and monitoring
- HTML Parsing - HTML parsing Builds the (Document Object Model) DOM from HTML
- CSS parsing - Creates the (CSS Object Model) CSSOM from the stylesheets
- Render tree construction - Combines DOM and CSSOM, excluding hidden elements
- Layout calculation - Determines positions and sizes of elements
- Painting - Fills in pixels, rendering texts, colors, and images
- Compositing - Assembles layers and prepares final screen output (animations, overlays, scrolling, etc)
- Local Ul state - For isolated, component-specific data (e.g., toggles, form inputs)
- React useState, Vue reactive
- Excessive local state can reduce reusability
- Global application state - When multiple components need access to shared data (e.g., user auth, theme)
- Redux, Zustand, Vuex, React Context
- Overuse can lead to tightly coupled logic
- Server state - For handling data from APIs or external sources (e.g., products, messages)
- React Query, SWR, Apollo
- Must handle async data and loading states correctly
- Session and persistent state - When state must persist across sessions (e.g., auth tokens, user preferences)
- localStorage, sessionStorage, cookies
- Needs manual sync and secure handling
-
Use locking mechanisms (e.g., mutex, semaphores).
-
Implement optimistic concurrency control.
-
Apply transactional consistency models.
-
Use consensus algorithms (Raft, Paxos).
-
Implement event-driven architectures.
-
Employ distributed caching strategies.
-
Apply replication and checkpointing.
-
Use distributed storage solutions.
-
Implement failover mechanisms.
-
Utilize finite state machines (FSM).
-
Apply event sourcing.
-
Use structured state modeling.
-
Adopt modular architectures.
-
Use state management libraries (Redux, Zustand).
-
Leverage microservices for scalability.
- Modular state slices
- Async state handling (e.g., with React Query)
- Memoized selectors (reselect)
- Persisted state
- Event-driven updates
| Feature | HTTP/1.1 | HTTP/2 | HTTP/3 |
|---|---|---|---|
| Request handling | Sequential over a single connection | Multiplexing (multiple requests on the same connection) | Multiplexing with QUIC (integrated trans-port and security) |
| Latency | High due to head-of-line blocking | Reduced latency due to multiplexing | Further reduced latency, especially in high-loss or high-congestion networks |
| Connection overhead | High (multiple connections required) | Low (uses fewer connections) | Very low, optimized for real-time communication |
| Protocol features | Basic transport mechanism | Stream prioritization, header compression | Built-in encryption, faster connection setup |
| Best for | Simple web applications with low traffic | Websites with many assets or high concurrency | Real-time applications, mobile, stream-ing, or high-latency networks |
| Applications | Simple, low-traffic websites, basic applications | Websites with many assets (e-commerce, media-heavy sites) | Streaming services, mobile apps, real-time communication platforms |
- Connection Keep-Alive
- Content compression
- Browser caching
- Cache-Control, Expires, and ETag
- Service workers take caching further by intercepting requests and serving pre-cached assets locally, enhancing speed and enabling offline support
- Network caching techniques
- CDNs
- Reverse proxies
- Edge servers
- Caches managed by ISPs
- Reducing DNS lookups - use dns-prefetch
- Using prefetch, preload, and preconnect
- prefetch: fetch resources likely needed in the near future.
- preload: critical for the current navigation.
- preconnect: early connections to third-party origins.
asyncdownload parallel, execute immediately, order not guaranteeddeferdownload parallel, execute after HTML parsing, in-order
- Appropriate API architecture: REST, GraphQL, or gRPC
- Mobile optimization: responsive designs, minimizing resource-heavy operations, image size optimization
- Caching strategies: browser, CDN, and server-side caching
- Performance monitoring: dev tools, sentry, vercel performance
- Choosing the right image formats: WebP (lossy, lossless), AVIF (better), SVGs (infinite scalability, lightweight, CSS-JS manipulations possible)
srcsetattribute - browsers select image resolution based on the device’s screen size, save bandwidth, faster loadingloading="lazy"- deferring the loading of offscreen images until the user scrolls near them.