Tagged articles
2 articles
Page 1 of 1
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
ITPUB
ITPUB
Feb 15, 2017 · Backend Development

Demystifying Python Decorators: Build a Flask‑Style Router for Tornado

This tutorial explains how Python decorators work, demonstrates a simple decorator that adds database‑connection logic, shows how to return a wrapper function to avoid modifying existing calls, and walks through creating a Flask‑style @router decorator for Tornado web routing.

decoratorssyntactic sugartornado
0 likes · 7 min read
Demystifying Python Decorators: Build a Flask‑Style Router for Tornado