Question

Should a single page web app should have different titles for different routes?

Let say we have single-page app which have below routes:

  • /#dashboard
  • /#users
  • /#items

When route /#dashboard loads, should the page title reflect the route?

Was it helpful?

Solution

I would say the page title should reflect the current route. I've used HistoryJS for managing both the URL and the page title. https://github.com/browserstate/history.js/ You can send the page name along with the URL you want. It uses HTML5 PushState but also has support for older browsers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top