Better to use Hashbangs or history API with history.js for a single page application?

The way I see it, it looks like the hashbanks were a "hacky" fix, which is actually all good! That said, it looks like the history API (pushstate popstate) is the CORRECT way of building a single page app and is actually sane now that History.js provides such a clean / simple structure for states.

I know the biggest problem:

1) Backward compatibility issues with history API - HTML 4 browsers cannot use history API. However, history.js has what has been resolved now as it automatically converts to be compatible with HTML 4 browsers (changes in hashes).

I know this is a discussion that changes throughout the month, like any programming discussion, but as of April 2015, is this the best option? And what is more likely to stand the test of time? I am currently using History.js with my single page application, however my guide is somewhat skeptical and prefers hashbangs. Any input?

+3


source to share





All Articles