# History API는 죽었습니다. Navigation API여 영원하라

> Clean Markdown view of GeekNews topic #6715. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=6715](https://news.hada.io/topic?id=6715)
- GeekNews Markdown: [https://news.hada.io/topic/6715.md](https://news.hada.io/topic/6715.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2022-06-09T12:39:16+09:00
- Updated: 2022-06-09T12:39:16+09:00
- Original source: [youtube.com](https://www.youtube.com/watch?v=cgKUMRPAliw)
- Points: 15
- Comments: 2

## Topic Body

- SPA에서 많이 사용하는 History API는 SPA가 많이 사용되기 전에 개발되어서 잘 어울리지 않음  
- 이를 개선한 Navigation API는 현재 Draft 상태이지만, 크롬 102 버전부터 미리 적용  
- 글로벌 `navigation` 객체에 `navigate` 리스너를 붙여서 동작   
  - 사용자 또는 프로그램적으로 네비게이션(클릭, 서브밋, 백/포워드)할 때 무조건 호출되어 중앙집중식 처리 가능  
- `transitionWhile()` 또는 `preventDefault()`로 인터셉트 가능

## Comments



### Comment 10420

- Author: cometkim
- Created: 2022-06-09T12:44:24+09:00
- Points: 1

이전에 App History API 로 알려져 있던 제안입니다.  
훨씬 오래걸릴 줄 알았는데 빠르게 들어오네요.

### Comment 10419

- Author: xguru
- Created: 2022-06-09T12:39:22+09:00
- Points: 2

Navigation API https://developer.chrome.com/docs/web-platform/navigation-api/
