Tag

JavaScript

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 15, 2025 · Frontend Development

Master Cross‑Tab Communication: BroadcastChannel vs localStorage in JavaScript

Learn how to synchronize data across multiple browser tabs using the native BroadcastChannel API and the fallback localStorage + storage event, with step‑by‑step code examples, usage scenarios, feature comparisons, compatibility notes, and a reusable TabMessenger class for seamless inter‑tab messaging.

BroadcastChannelFrontendJavaScript
0 likes · 9 min read
Master Cross‑Tab Communication: BroadcastChannel vs localStorage in JavaScript
php中文网 Courses
php中文网 Courses
Jun 13, 2025 · Backend Development

How to Build a Real-Time Camera Filter App with PHP and JavaScript

This tutorial walks you through installing PHP‑GD and Video4Linux, creating a web page that previews the webcam using getUserMedia, adding a filter selector, and processing the image on the server with PHP‑GD to apply real‑time visual effects.

GD LibraryImage ProcessingJavaScript
0 likes · 9 min read
How to Build a Real-Time Camera Filter App with PHP and JavaScript
Architect's Guide
Architect's Guide
Jun 12, 2025 · Backend Development

How to Build QR Code Login with WebSocket in Spring Boot

This tutorial walks through designing a QR‑code login flow, defining a token table, outlining client and server roles, implementing two REST endpoints, configuring Spring Boot WebSocket support, and handling real‑time login notifications with Java and JavaScript code examples.

JavaJavaScriptQR code login
0 likes · 13 min read
How to Build QR Code Login with WebSocket in Spring Boot
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 12, 2025 · Frontend Development

Mastering Module Federation with Vite & Vue: A Step‑by‑Step Guide

Learn how to implement Webpack’s Module Federation using Vite and Vue, covering core concepts, advantages over traditional micro‑frontend solutions, detailed setup steps, code examples, and common pitfalls such as dependency conflicts and version mismatches.

FrontendJavaScriptVue
0 likes · 8 min read
Mastering Module Federation with Vite & Vue: A Step‑by‑Step Guide
Code Mala Tang
Code Mala Tang
Jun 10, 2025 · Frontend Development

7 Powerful Ways to Compare JavaScript Arrays (Including Deep Equality)

This guide explains eight practical techniques—from strict reference checks to deep recursive comparisons and Lodash utilities—for accurately comparing JavaScript arrays, handling simple values, nested structures, unordered elements, and finding differences or common items.

Array ComparisonCode ExamplesDeep Equality
0 likes · 7 min read
7 Powerful Ways to Compare JavaScript Arrays (Including Deep Equality)
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 10, 2025 · Game Development

Build a Crossy‑Road Style 3D Game with Three.js – A Step‑by‑Step Guide

This tutorial walks you through creating a lightweight, child‑friendly 3D Crossy Road‑style game using Three.js, covering scene setup, metadata‑driven terrain generation, asset loading, player movement queues, dynamic collision detection, UI communication, and deployment tips, all illustrated with code snippets and screenshots.

3DGame DevelopmentJavaScript
0 likes · 30 min read
Build a Crossy‑Road Style 3D Game with Three.js – A Step‑by‑Step Guide
Architecture and Beyond
Architecture and Beyond
Jun 8, 2025 · Frontend Development

Why Server‑Sent Events (SSE) Power Real‑Time Typing Effects in AI Chat Apps

Server‑Sent Events (SSE) offer a lightweight, HTTP‑native solution for real‑time, one‑way streaming, making them ideal for AI chat applications that need a typewriter‑style response, with advantages over WebSockets such as easy implementation, automatic reconnection, broad compatibility, and simple debugging.

JavaScriptPythonReal-time Streaming
0 likes · 13 min read
Why Server‑Sent Events (SSE) Power Real‑Time Typing Effects in AI Chat Apps
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 8, 2025 · Frontend Development

Why Did My JavaScript Timestamp Show the Wrong Date? A Dayjs Debugging Guide

A developer discovers a bug where a time component displays incorrect dates because the backend switched timestamp values from numbers to strings, and learns how to correctly parse timestamps in JavaScript using Dayjs and defensive Number conversion.

FrontendJavaScriptdate parsing
0 likes · 5 min read
Why Did My JavaScript Timestamp Show the Wrong Date? A Dayjs Debugging Guide
Code Mala Tang
Code Mala Tang
Jun 2, 2025 · Backend Development

Why Node.js 24 Is a Game-Changer for Backend Development

Node.js 24 introduces native fetch support, a faster V8 engine, enhanced module interoperability, full Web Streams API, and numerous ecosystem upgrades, making it a compelling upgrade for developers seeking modern, high‑performance server‑side JavaScript.

JavaScriptNode.jsV8
0 likes · 7 min read
Why Node.js 24 Is a Game-Changer for Backend Development
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 29, 2025 · Frontend Development

Creating a Git Information Injection Plugin for Webpack and Vite Using Trae‑Builder

This article explains how to develop a custom plugin that automatically captures Git metadata during build time, injects it into the bundled code, and exposes the information via a console command, with step‑by‑step guidance for both Webpack and Vite projects using Trae‑Builder.

GitJavaScriptTrae-Builder
0 likes · 12 min read
Creating a Git Information Injection Plugin for Webpack and Vite Using Trae‑Builder
Sohu Tech Products
Sohu Tech Products
May 28, 2025 · Frontend Development

A One‑Line Guard for Safe localStorage JSON Parsing in Frontend Development

This article explains why naïvely parsing JSON from localStorage often crashes applications, and provides a concise safeJSON wrapper, versioned key strategy, and TypeScript guards to prevent runtime errors and ensure robust frontend data handling.

Error HandlingFrontendJSON
0 likes · 4 min read
A One‑Line Guard for Safe localStorage JSON Parsing in Frontend Development
Code Mala Tang
Code Mala Tang
May 24, 2025 · Fundamentals

Master JSON: Structure, Nesting, and Access in JavaScript & Python

This article explains what JSON is, its language‑independent syntax, how to define objects, arrays and nested structures, and demonstrates practical ways to parse and manipulate JSON data using JavaScript and Python code examples.

Data InterchangeJSONJavaScript
0 likes · 10 min read
Master JSON: Structure, Nesting, and Access in JavaScript & Python
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 24, 2025 · Frontend Development

Bookmarklet Tutorial: Turning Any Webpage into an Editable Tool with JavaScript Bookmarks

This article explains what Bookmarklets are, how to create them in Chrome by converting a normal bookmark into a JavaScript snippet, and showcases practical use‑cases such as making pages editable, highlighting links, applying CSS filters, scrolling, and element hover highlighting, all with concise code examples.

BookmarkletBrowser ToolsFrontend
0 likes · 4 min read
Bookmarklet Tutorial: Turning Any Webpage into an Editable Tool with JavaScript Bookmarks
php中文网 Courses
php中文网 Courses
May 21, 2025 · Frontend Development

Generating Charts with Labels and Legends using ECharts and PHP API

This article demonstrates how to integrate the open‑source ECharts library with a PHP backend to dynamically generate a labeled, legend‑enabled statistical chart, covering resource inclusion, data preparation in JSON, HTML container setup, and JavaScript configuration with init() and setOption() calls.

EChartsJavaScriptPHP
0 likes · 7 min read
Generating Charts with Labels and Legends using ECharts and PHP API
Top Architecture Tech Stack
Top Architecture Tech Stack
May 19, 2025 · Backend Development

Understanding Server‑Sent Events (SSE): Concepts, Comparison with Polling and WebSocket, and Practical Implementation

This article explains the scenarios where servers need to push data to clients, compares three implementation methods—polling, WebSocket, and SSE—highlights their advantages and drawbacks, and provides step‑by‑step frontend and Node.js backend demos for building a real‑time SSE connection.

ExpressJavaScriptNode.js
0 likes · 13 min read
Understanding Server‑Sent Events (SSE): Concepts, Comparison with Polling and WebSocket, and Practical Implementation
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 14, 2025 · Frontend Development

Front‑End Large File Upload: Principles, Key Features, and Using the enlarge‑file‑upload Library

This article explains the concept of large file upload in front‑end development, outlines the problems it solves, compares it with ordinary uploads, details essential implementation steps such as chunking, parallelism, resume, and integrity checks, and demonstrates practical usage of the enlarge‑file‑upload library across vanilla JavaScript, Vue2, Vue3, and React.

FrontendJavaScriptenlarge-file-upload
0 likes · 18 min read
Front‑End Large File Upload: Principles, Key Features, and Using the enlarge‑file‑upload Library
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 13, 2025 · Frontend Development

Preventing Duplicate Button Submissions with Debounce, Loading State, and a Vue 3 Directive

This article explains how repeated button clicks cause duplicate submissions, demonstrates using debounce and a loading‑disabled state to mitigate the issue, and shows how to encapsulate the solution into a reusable Vue 3 directive with complete code examples.

DebounceDirectiveFrontend
0 likes · 9 min read
Preventing Duplicate Button Submissions with Debounce, Loading State, and a Vue 3 Directive
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 12, 2025 · Frontend Development

Understanding Browser Rendering, Event Loop, and Techniques to Avoid Page Jank When Adding Massive DOM Elements

This article explains the underlying browser mechanisms that cause page jank when creating millions of DOM elements, analyzes the event loop, rendering pipeline, macro‑ and micro‑tasks, and presents practical solutions such as setTimeout, requestAnimationFrame, MessageChannel, and requestIdleCallback to keep the UI responsive.

DOMEvent LoopJavaScript
0 likes · 16 min read
Understanding Browser Rendering, Event Loop, and Techniques to Avoid Page Jank When Adding Massive DOM Elements
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 5, 2025 · Frontend Development

Design and Implementation Considerations for Building a Rich Text Editor from Scratch

This article explores the motivations, architectural choices, zero‑width character handling, data‑structure design, and implementation strategies—including execCommand, ContentEditable, and Canvas approaches—for creating a custom rich‑text editor that balances flexibility, performance, and browser compatibility.

ContentEditableData StructureFrontend
0 likes · 29 min read
Design and Implementation Considerations for Building a Rich Text Editor from Scratch
Code Mala Tang
Code Mala Tang
May 3, 2025 · Frontend Development

How Top Engineers Refactor Complex Conditional Logic for Cleaner Code

This article examines why developers often over‑nest and misuse conditional statements, then presents proven techniques—early returns, lookup objects, optional chaining, guard clauses, and state machines—to simplify, improve readability, and make conditional logic more maintainable and scalable.

Best PracticesCode readabilityJavaScript
0 likes · 8 min read
How Top Engineers Refactor Complex Conditional Logic for Cleaner Code