ampproject / ampproject/amphtml

amp-bind: Support title and URL change in AMP.pushState

Open
#23,560 14 comments 6 reactions 0 assignees View on GitHub
Component: amp-bind P3: When Possible Stale Type: Feature Request WG: runtime
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

At `history.pushState` we can pass `URL` `history.pushState(stateObj, title, URL);` to change URL in browser without navigating away from page.

Could AMP implement it?

Ex.: In a SPA, an user select Tweets tab, and url change to `/tweets`, then select Agenda and url change to `/agenda`.

![image](https://user-images.githubusercontent.com/4308648/61996787-7ce44c00-b066-11e9-87a9-d0b6c36735d4.png)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the amp-bind implementation of AMP.pushState and compare its behavior with the browser history.pushState(stateObj, title, URL) API described in the issue. Done means selecting SPA tabs can update the document title and browser URL, such as /tweets and /agenda, without navigating away from the page.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
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.