chrisdiana / chrisdiana/cms.js

Use HTML5 History API instead of hash

Open
#80 1 comment 6 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
3.1k
Forks
279
PR merge metrics
No merged PRs in 30d

Description

You could use [HTML5 History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) instead of `window.location.hash`. It allows to change state, title and URL of page without reloading the page.

One problem is that pages aren't real so refreshing the page will probably land on an invalid URL. Is it possible to handle that?

Here is a demo: https://html5demos.com/history/

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the existing use of window.location.hash and the client-side navigation flow. Evaluate the HTML5 History API demo linked in the issue, then verify that navigation updates the URL, state, and title without reloading and that refreshing a generated-page URL does not land on an invalid page.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.