JavaScript
Author

JavaScript

Provides JavaScript enthusiasts with tutorials and experience sharing on web front‑end technologies, including JavaScript, Node.js, Deno, Vue.js, React, Angular, HTML5, CSS3, and more.

353
Articles
0
Likes
644
Views
0
Comments
Recent Articles

Latest from JavaScript

100 recent articles max
JavaScript
JavaScript
Jan 1, 2026 · Information Security

Why Storing JWT in localStorage Is No Longer Safe and What to Use Instead

Storing JWT tokens in localStorage has become a serious security risk because XSS attacks can steal them, so developers should adopt safer alternatives such as HttpOnly cookies, BFF‑backed sessions, or Service Worker‑based in‑memory storage, each with its own trade‑offs.

AuthenticationBFFCSRF
0 likes · 10 min read
Why Storing JWT in localStorage Is No Longer Safe and What to Use Instead
JavaScript
JavaScript
Dec 31, 2025 · Frontend Development

7 Reliable Alternatives to setTimeout for Precise JavaScript Timing

The article outlines seven browser‑based techniques—including requestAnimationFrame, setInterval, requestIdleCallback, Web Workers, Promise + async/await, the Web Animations API, and Intersection Observer—each offering higher accuracy, better resource handling, or smoother execution than the traditional setTimeout timer.

JavaScriptPerformanceTimers
0 likes · 4 min read
7 Reliable Alternatives to setTimeout for Precise JavaScript Timing
JavaScript
JavaScript
Dec 31, 2025 · Frontend Development

Unlock Hidden Performance Gains in Front‑End Apps with Web Workers

Web Workers let JavaScript run heavy computations in background threads, freeing the main UI thread, boosting multi‑core utilization, and improving memory management, which together dramatically enhance front‑end performance for tasks like data processing, image filtering, media handling, and AI inference.

JavaScriptPerformance optimizationWeb Workers
0 likes · 5 min read
Unlock Hidden Performance Gains in Front‑End Apps with Web Workers
JavaScript
JavaScript
Dec 30, 2025 · Frontend Development

Why document.domain Is Being Deprecated and How to Migrate Your Web Apps

This article explains the background and security concerns behind the deprecation of the JavaScript document.domain API, details browser warnings, and provides a step‑by‑step migration guide using postMessage, Channel Messaging, and proper CORS configuration to keep web applications functional.

Cross-Origindeprecationdocument.domain
0 likes · 5 min read
Why document.domain Is Being Deprecated and How to Migrate Your Web Apps
JavaScript
JavaScript
Dec 29, 2025 · Frontend Development

Master Concurrent JavaScript: Replace Promise.all with Promise.allSettled

While Promise.all is the traditional way to run multiple asynchronous operations in JavaScript, it aborts the whole batch when any promise rejects, making it impossible to know which calls succeeded; Promise.allSettled overcomes this by waiting for all promises and providing a detailed status for each result.

AsynchronousJavaScriptPromise
0 likes · 5 min read
Master Concurrent JavaScript: Replace Promise.all with Promise.allSettled
JavaScript
JavaScript
Dec 27, 2025 · Frontend Development

Detecting Page Exit: Best APIs and Practices for Reliable Data Reporting

This guide explains how to detect when a user leaves a web page using modern APIs like Page Visibility, beforeunload/unload, sendBeacon, and pagehide, compares their advantages and drawbacks, provides code snippets, and offers practical recommendations for reliable data reporting and UI handling.

browser APIfrontendpage-visibility
0 likes · 8 min read
Detecting Page Exit: Best APIs and Practices for Reliable Data Reporting
JavaScript
JavaScript
Dec 25, 2025 · Frontend Development

Boost JavaScript Async Performance by Up to 80% with Advanced Promise Techniques

This article explains why async/await can introduce performance overhead, then presents four optimized Promise‑based patterns—including chain optimization, Promise.all parallelism, batch processing, and pooling—that can improve JavaScript asynchronous code speed by up to 80% in high‑frequency or large‑scale scenarios.

ConcurrencyJavaScriptOptimization
0 likes · 5 min read
Boost JavaScript Async Performance by Up to 80% with Advanced Promise Techniques
JavaScript
JavaScript
Dec 24, 2025 · Frontend Development

Beyond the Classic for Loop: Modern JavaScript Iteration Techniques

This article examines why traditional JavaScript for loops are often suboptimal and introduces more readable, functional, and powerful alternatives such as array methods, for...of, for...in, and the spread operator, while also outlining scenarios where the classic for loop still shines.

ES6IterationJavaScript
0 likes · 7 min read
Beyond the Classic for Loop: Modern JavaScript Iteration Techniques
JavaScript
JavaScript
Dec 21, 2025 · Frontend Development

Why IndexedDB Outperforms localStorage for Modern Web Apps

This article examines the security, performance, capacity, and query limitations of localStorage, explains how IndexedDB addresses each issue with asynchronous APIs, larger storage, stronger security, and advanced indexing, and introduces helper libraries that simplify its use.

IndexedDBPerformanceStorage
0 likes · 5 min read
Why IndexedDB Outperforms localStorage for Modern Web Apps
JavaScript
JavaScript
Dec 17, 2025 · Frontend Development

Why vw and clamp() Are Replacing px and rem for Fluid Layouts

The article explains how modern CSS is shifting from fixed pixel and rem units to viewport‑based vw and the clamp() function, offering truly fluid, boundary‑controlled layouts that scale smoothly across any screen size while preserving accessibility where needed.

CSSVWclamp
0 likes · 5 min read
Why vw and clamp() Are Replacing px and rem for Fluid Layouts