Twitter to Remove Hashbang (#!) URLs & Replace with PushState

Have you ever noticed the hashbang (/#! /) in the middle of your Twitter profile URL? Well, now, you can no longer see them, with Dan Webb, a Twitter front end engineer, recently confirming that twitter is working on eliminating hashbangs. In the place of hashbangs, pushState will be utilized to refresh pages.

The merits of the hashbang, such as faster loading time with JavaScript routing and full page load have been overruled with its technical problems and URL issues. The hashbang URL has also posed a problem for web developers, as there are always two versions of each URL.

Earlier on, hashbang URLs were widely used, because they were the only method of dynamically updating a URL to reflect its current application state. But with the development of pushState, all this changed, enabling web developers to arbitrarily change a URL, as long as the domain stays the same.

In his popular blog, Dan Webb says that the hashbang technique is destructive to the web and the implementation is inappropriate, even as a temporary measure or as a downgrade experience. He says that traditional URLs are important because:

  • URLs are an important part of the web, since one piece of data is linked with another piece of data, via a URL. Furthermore, any piece of content can reference any other piece of content directly.
  • Content along with the URLs that they link to, gets indexed, archived and preserved on the web. A change in a URL scheme can last a long time and even if internal links are changed to fit a new URL scheme, you will have no control over the rest of the web that links to your content.
  • URLs need to be made future proof, as if you change URLs, you run the risk of severing links from the rest of the web and making your content less useful.

If you are a web developer keen on using hashbangs for your website, give them a thought, before implementing them on new content, as once you create them, you cannot return to traditional URLs without breaking links.

What are your opinions about the use of hashbangs? Do you like them or hate them? Post your comments here.

Related Posts