Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
# The Modern JavaScript Tutorial - Part III: Additional Articles
## 【One-Line Pitch】
A deep-dive reference for intermediate JavaScript developers covering browser APIs, binary data handling, network communication, and real-time features—essential reading if you've mastered the basics and need practical knowledge for building production web applications.
## 【Book Arc】
- **Opening (~0%–10%)**: Browser window management and security fundamentals—popup windows, the Same Origin Policy, iframe access restrictions, and cross-window communication patterns.
- **Early (~10%–25%)**: Binary data handling with ArrayBuffer, TypedArrays, TextEncoder/Decoder, and Blob objects, plus the Fetch API basics for making HTTP requests.
- **Early (~25%–35%)**: Advanced Fetch capabilities including FormData for file uploads, download progress tracking, cross-origin request mechanics, and URL/URLSearchParams for proper URL handling.
- **Middle (~35%–50%)**: XMLHttpRequest for upload progress and resumable uploads, long polling for server communication, and WebSocket for persistent bidirectional connections.
- **Late (~50%–75%)**: Cookies in depth—reading, writing, security attributes, and practical manipulation patterns for session management and user tracking.
- **Ending (~75%–100%)**: Additional browser APIs and advanced patterns (excerpts cover through cookies; later chapters presumably address remaining topics like animations and regex).
## 【Key Takeaways】
- **Same Origin Policy governs all cross-window access** (Opening): A window from another origin blocks access to its document, variables, and even reading its location—only writing location (redirecting) is permitted. This is the foundation of browser security.
- **TypedArrays provide structured binary views** (Early): Uint8Array, Int16Array, Float64Array, etc., are views over a shared ArrayBuffer, not standalone arrays. You can create multiple views over the same buffer without copying data, enabling efficient binary manipulation.
- **TextEncoder/TextDecoder handle UTF-8 conversion** (Early): TextEncoder only supports UTF-8 and converts strings to Uint8Array; TextDecoder reverses the process. Use subarray views to decode specific portions of binary data.
- **Blob represents binary data with MIME type** (Early): Higher-level than ArrayBuffer, Blob integrates with canvas operations (via toBlob), file downloads, and Fetch requests. Canvas transformations can be exported directly as Blobs.
- **Fetch API covers modern HTTP needs** (Early): response.text(), .json(), .blob(), and .arrayBuffer() handle different response types. The keepalive option enables background requests during page unload (limited to 64kb body).
- **FormData simplifies file uploads** (Early): Create from HTML forms or build programmatically; append(name, blob, filename) handles file fields. The set() method replaces existing fields while append() adds duplicates.
- **WebSocket enables real-time bidirectional communication** (Middle): Persistent connection with packet-based data exchange, ideal for chat, games, and trading systems. Use bufferedAmount to check transmission status and close() with codes for graceful shutdown.
- **Cookies are accessor properties, not simple data** (Late): document.cookie reads all cookies as a semicolon-delimited string; writing updates only specified cookies. Security attributes like SameSite prevent clickjacking attacks.
## 【Reading Tips】
- **Skim the popup window section** (~0%–5%): The window.open API is rarely needed in modern development, but the Same Origin Policy discussion is essential—read that part carefully.
- **Deep-read the binary data chapters** (~10%–20%): TypedArrays and Blob are foundational for file handling, canvas operations, and WebSocket binary protocols. Work through the code examples actively.
- **Focus on Fetch options and FormData** (~20%–30%): These are the most practical skills for daily development. The full Fetch options list is worth bookmarking for reference.
- **Pay special attention to WebSocket** (~42%–48%): Real-time features are increasingly important. The connection lifecycle, bufferedAmount checking, and close codes are production-critical knowledge.
- **The cookie chapter is reference material** (~48%–55%): Read for understanding of security implications, then return when you need specific manipulation patterns.
## 【Coverage Limits】
This guide covers the first half of Part III (through cookies). The excerpts do not cover later chapters on regular expressions, animations, or other additional articles that appear later in the book.
##
Excerpt 1
(another port: 8080 ) The “Same Origin” policy states that: ● if we have a reference to another window, e.g. a popup created by window.open or a window insid...
nload it let link = document.createElement('a'); link.download = 'example.png'; link.href = URL.createObjectURL(blob); link.click(); // delete the internal b...
le the server response if the request is made in onunload , because the document is already unloaded at that time, functions won’t work. ● Usually, the serve...
pgrade functions: from 1 to 2, from 2 to 3, from 3 to 4 etc. Then, in upgradeneeded we can compare versions (e.g. old 2, now 4) and run per-version upgrades...
dEventListener('transitionend', function() { times++; go(); The event object for transitionend has few specific properties: event.propertyName The property t...
is to find non-digits \D and remove them from the string: let str = "+7(903)-123-45-67"; alert( str.replace(/\D/g, "") ); // 79031234567 A dot is “any charac...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
The Modern JavaScript Tutorial - Part III. Additional Articles (Regexps, Animations, etc.) (Ilya Kantor)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share to WeChat Moments
The Modern JavaScript Tutorial - Part III. Additional Articles (Regexps, Animations, etc.) (Ilya Kantor)(Z-Library)
Scan the QR code with WeChat to open this book
Tap the ··· menu in the top-right corner
Choose Share to Moments
You are already in WeChat. Tap ··· in the top-right corner and choose Share to Moments.
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
The Modern JavaScript Tutorial - Part III. Additional Articles (Regexps, Animations, etc.) (Ilya Kantor)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment