跪拜 Guibai
← Back to the summary

The Frontend Foundation: A Full-Stack Map from JS Closures to Browser Rendering

Frontend Knowledge System Overview

1. Functional Programming

1.1 Core Feature: Immutability

1.2 Pure Functions

1.3 Related Utility Libraries

1.4 Unidirectional Data Flow

1.5 Composition over Inheritance

1.6 Higher-Order Functions

1.7 Declarative Style

2. What Happens When You Enter a URL

2.1 URL Parsing

2.2 Domain Name Resolution (DNS)

2.3 Network Transmission Layers

2.4 Browser Rendering

3. Cross-Tab Communication

3.1 Problem Solved

Solves communication issues between tabs of the same or different origins.

3.2 Technology Selection

4. Web Worker

4.1 Why Use Web Worker

4.2 Purpose

4.3 Application Scenarios

4.4 Drawbacks

5. Browser Storage

5.1 Cookie

5.2 localStorage

5.3 IndexedDB (Asynchronous)

5.4 sessionStorage

5.5 Token vs. Session

5.6 Related Questions

6. Cross-Origin

6.1 Essence

Browser security restriction to ensure safety, prohibiting scripts from different origins from interacting; same origin requires protocol, port, and domain to be exactly the same.

6.2 Solution Strategies

7. Frontend Security

7.1 XSS (Cross-Site Scripting)

7.2 XSRF/CSRF (Cross-Site Request Forgery)

7.3 Other Attacks

8. Frontend Engineering

8.1 What is Engineering

A set of software engineering processes, including development, testing, optimization, deployment, monitoring, CI/CD, and other systematic engineering.

8.2 Modularization

8.3 Webpack

8.4 Vite

8.5 Package Management Tools

8.6 Monorepo

8.7 Turbopack: Just understand it.

8.8 CI/CD

8.9 Testing

9. JavaScript Core Fundamentals

9.1 Data Types

9.2 Type Checking

9.3 Floating-Point Precision Issue

9.4 Symbol

9.5 Event Loop

9.6 Scope and Closures

9.7 this Binding

9.8 Prototype and Prototype Chain

9.9 Asynchronous Programming

9.10 ES6 Features

10. TypeScript

10.1 What is TS

10.2 Compilation Principle

  1. Parse TS: Lexical analysis, syntax analysis.
  2. Type checking: Checks if types are standard, reports errors if not.
  3. Code generation: Removes all type content and transpiles, outputting browser-recognizable JS.

10.3 Common Types

11. React

11.1 What is React

11.2 Fiber

11.3 Reconciliation and Commit

11.4 Priority Scheduling

11.5 Diff Algorithm

11.6 Hooks

11.7 Synthetic Events

11.8 Redux

11.9 Component Lifecycle

11.10 JSX Essence

11.11 Version Differences

12. Browser Rendering

12.1 Rendering Process and Flow

12.2 JS Blocking Issue

12.3 Reflow and Repaint

12.4 Advantages of Multi-Process Architecture

13. HTTP

13.1 Definition

A transfer protocol, used for data request and transmission, located at the application layer.

13.2 Differences between HTTP 1.0 and 1.1

13.3 HTTP 2.0

13.4 HTTP 3.0

14. Performance Optimization

14.1 Performance Metrics

14.2 Loading Performance Optimization

14.3 Rendering Performance Optimization

15. Frontend Monitoring

15.1 Behavior Monitoring

15.2 Performance Monitoring

15.3 Error Monitoring

15.4 White Screen Detection

16. System Design

16.1 Component Library Design

16.2 File Upload Design

17. CSS Supplement

17.1 HTML Semantics

17.2 H5 New APIs

17.3 Box Model

17.4 BFC (Block Formatting Context)

17.5 Clearing Floats

17.6 Flex Layout

18. Caching

18.1 Strong Cache and Negotiated Cache

18.2 Overall Caching Flow

19. HTTPS

19.1 What it is

Based on the HTTP protocol, relies on the TLS handshake at the lower layer to ensure transmission security.

19.2 Hybrid Encryption Mechanism

19.3 TLS Handshake Process

20. TCP / UDP

20.1 What is TCP

Transmission Control Protocol, solves end-to-end, connection-oriented, byte-stream reliable transmission; based on the transport layer.

20.2 Three-Way Handshake

  1. Client sends a connection request to TCP: SYN=1, sends seq.
  2. Server receives: Returns seq and an ACK based on the previous seq.
  3. Client: Sends ACK again, starts communication.

20.3 Four-Way Wave

  1. Sender: Sends FIN termination packet and seq.
  2. Receiver: Returns ACK confirmation.
  3. Receiver: After remaining data is sent, sends FIN termination packet and seq.
  4. Sender: Returns ACK confirmation, waits 2MSL before entering CLOSED state.

20.4 TCP Features

20.5 TCP Security and Issues

20.6 UDP

21. Architecture Design and Coding Standards

21.1 MVC

21.2 Virtual Scrolling

21.3 Node Related