Tagged articles
10 articles
Page 1 of 1
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 17, 2025 · Frontend Development

Intercepting Browser Navigation Events (Back/Forward, Refresh/Close, and Route Changes) in Vue Applications

This article explains how to prevent loss of unsaved video data by intercepting browser back/forward actions, page refresh or close events, and Vue router navigation using the History API, beforeunload listener, and navigation guards, with complete Vue code examples.

Browser InterceptionHistory APINavigation Guard
0 likes · 11 min read
Intercepting Browser Navigation Events (Back/Forward, Refresh/Close, and Route Changes) in Vue Applications
FunTester
FunTester
Jan 8, 2025 · Frontend Development

Master Chrome Extension APIs: History, Downloads, and Storage Management

This article provides a comprehensive guide to Chrome extension development, covering the History, Downloads, and Storage APIs with practical code examples, advanced usage tips, privacy considerations, and custom scripts for efficient data management.

Chrome ExtensionDownloads APIHistory API
0 likes · 10 min read
Master Chrome Extension APIs: History, Downloads, and Storage Management
IT Services Circle
IT Services Circle
Aug 21, 2023 · Frontend Development

Understanding the History API and How React Router Implements It

This tutorial explains the fundamentals of the browser History API—including length, back, forward, go, pushState, replaceState, and scrollRestoration—demonstrates their behavior with visual examples, and then shows step‑by‑step how React Router leverages these APIs to match routes, render components, and handle navigation events such as popstate.

History APIReactRouter
0 likes · 10 min read
Understanding the History API and How React Router Implements It
Sohu Tech Products
Sohu Tech Products
Jan 11, 2023 · Frontend Development

Route Guards and the Emerging Navigation API for SPA Routing

This article explains the limitations of using History API for SPA route guards, compares two common workarounds, and introduces the new Navigation API as a more centralized and native solution for handling navigation events, transitions, and abortable fetches in modern front‑end development.

History APIJavaScriptNavigation API
0 likes · 13 min read
Route Guards and the Emerging Navigation API for SPA Routing
ELab Team
ELab Team
Jan 4, 2023 · Frontend Development

From History API to Navigation API: Mastering SPA Route Guards

This article explores the limitations of using History API for SPA route guards, presents two common workarounds, and introduces Chrome's Navigation API as a more centralized solution, detailing its events, transition handling, entry management, and current compatibility concerns.

History APINavigation APIRoute Guard
0 likes · 14 min read
From History API to Navigation API: Mastering SPA Route Guards
Tencent Music Tech Team
Tencent Music Tech Team
Nov 6, 2021 · Frontend Development

Web Routing in Single‑Page Applications: Hash, History, and Memory Modes

The article explains client‑side routing for single‑page applications, detailing three approaches—hash mode using location.hash and onhashchange, history mode leveraging the HTML5 History API’s pushState/replaceState with popstate handling, and memory mode storing routes in JavaScript or localStorage—plus their trade‑offs regarding URL readability, SEO, server configuration, and browser support.

History APISPAfrontend development
0 likes · 11 min read
Web Routing in Single‑Page Applications: Hash, History, and Memory Modes
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Apr 12, 2021 · Frontend Development

Demystifying React Router: From Native JS Routing to Source Code Deep Dive

This article walks through building a basic front‑end router with vanilla JavaScript, then dissects React Router’s source code—including BrowserRouter, HashRouter, Router, Route, and matchPath—explaining their implementations, the history library, and how they improve routing compared to native approaches.

Hash RoutingHistory APIJavaScript
0 likes · 27 min read
Demystifying React Router: From Native JS Routing to Source Code Deep Dive
Beike Product & Technology
Beike Product & Technology
Mar 5, 2021 · Frontend Development

Understanding the Browser History API: Properties, Methods, Events, and Practical Front‑End Applications

This article introduces the window.history object, explains its key properties, methods and the popstate event, answers common questions about its behavior, and demonstrates practical uses such as single‑page routing, navigation control, and custom front‑end router implementations with code examples.

History APIJavaScriptSingle Page Application
0 likes · 16 min read
Understanding the Browser History API: Properties, Methods, Events, and Practical Front‑End Applications
JD Retail Technology
JD Retail Technology
Dec 7, 2020 · Frontend Development

Frontend Routing: Core Principles, Implementation, and Source Code Analysis

This article provides a comprehensive overview of frontend routing in single-page applications, covering its historical evolution, core concepts of hash and history modes, implementation details in Vue and React, code examples, navigation guards, nested routes, and practical considerations for choosing routing strategies.

History APIReactSPA
0 likes · 24 min read
Frontend Routing: Core Principles, Implementation, and Source Code Analysis
Alibaba Terminal Technology
Alibaba Terminal Technology
Jun 22, 2020 · Frontend Development

Mastering Micro‑Frontend Routing: From Basics to Sandbox Isolation

This article explores the challenges of routing in micro‑frontend architectures, explains why correct parent‑child routing is essential, walks through progressively more sophisticated solutions—including shared routes, sandbox isolation, and message‑based synchronization—and finally presents a robust implementation that works across diverse scenarios.

History APIfrontendmicro-frontend
0 likes · 18 min read
Mastering Micro‑Frontend Routing: From Basics to Sandbox Isolation