whatisgithub

What is history.js?

browserstate/history.js — explained in plain English

Analysis updated 2026-06-24

10,665JavaScriptAudience · developerComplexity · 2/5Setup · easy

In one sentence

An archived JavaScript library from 2013 that normalized browser differences in the HTML5 History API and added hash-based fallbacks for old browsers, now obsolete, as modern browsers have converged on the native standard.

Mindmap

mindmap
  root((history.js))
    What it does
      History API polyfill
      Cross-browser shim
      Archived 2013
    Tech Stack
      JavaScript
      jQuery adapter
      MooTools adapter
    Use Cases
      Legacy browser support
      Old app maintenance
      Polyfill reference
    Status
      No longer needed
      Last release 2013
      Archive only
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Support URL navigation in very old browsers that predate native HTML5 History API support using hash-based fallbacks

USE CASE 2

Maintain a legacy web app built before 2013 that already depends on History.js for back-button handling

USE CASE 3

Study how browser polyfills and cross-framework adapter patterns were implemented in the 2010s

What is it built with?

JavaScriptjQueryMooToolsPrototype

How does it compare?

browserstate/history.jsautomattic/node-canvasfoliojs/pdfkit
Stars10,66510,67310,655
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasymoderateeasy
Complexity2/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

No longer maintained since 2013, for modern projects use the native pushState API instead.

So what is it?

History.js is a JavaScript library that smooths out inconsistencies in how browsers handle the HTML5 History API, and adds a backwards-compatible fallback for older browsers that do not support it. The HTML5 History API lets web pages change the URL in the browser's address bar and manage navigation history without reloading the page, which is how many modern single-page web apps work. The problem is that different browsers have implemented this API slightly differently over the years, producing subtle bugs and inconsistencies. History.js aimed to normalize those differences. For browsers that do not support the HTML5 History API at all, History.js falls back to using URL hashes, the fragment that appears after a # sign in an address. This allowed sites built with History.js to work across a wide range of browsers, including much older ones, while still behaving correctly in modern ones. The library offered adapters for popular JavaScript frameworks of its era including jQuery, MooTools, and Prototype. The practical use case was websites that wanted to load content without full page refreshes, often called Ajax navigation or Ajaxify. History.js provided a consistent way to update the address bar as the user navigated, so that the back button worked correctly and pages were bookmarkable even though the content was loaded dynamically. The README is candid about the project's current state. The last release was in 2013. The maintainer explains that testing requires running manual checks across many browser and adapter combinations, which is time-consuming work that was never funded. The note advises that modern browsers have converged enough on the native API that a polyfill library is no longer needed for current projects. The repo now exists mainly as an archive for anyone still supporting very old browsers. No active maintenance is planned.

Copy-paste prompts

Prompt 1
My legacy app uses History.js for navigation, help me replace it with the native pushState API since the library is no longer maintained.
Prompt 2
Show me how History.js handled the hash-based fallback for old browsers and how I can replicate that behavior with modern JavaScript.
Prompt 3
Explain the adapter pattern History.js used to support jQuery, MooTools, and Prototype so I can understand how framework-agnostic polyfills are built.

Frequently asked questions

What is history.js?

An archived JavaScript library from 2013 that normalized browser differences in the HTML5 History API and added hash-based fallbacks for old browsers, now obsolete, as modern browsers have converged on the native standard.

What language is history.js written in?

Mainly JavaScript. The stack also includes JavaScript, jQuery, MooTools.

How hard is history.js to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is history.js for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.