Closed ghost closed 7 years ago
html5 is not used by default just because it mutates directly the url (not the uri fragment), that implies that if the user refreshes the page will get the 404 response unless the server is properly configured to return the "index.html" on all uris.
On the other hand, would be awesome have the ability to switch the implementation for users that want/need to use html5 history.
However, this error is pretty strange, I'm using bide in many projects and don't notice similar exceptions in console.
in this pull request for pushy https://github.com/kibu-australia/pushy/pull/21/commits/88cbb28ff5ad4ce9c06df2efbaa60f8e40608188 fragment support is added for HTML5History, so it does not seem impossible
an alternative would be to split-off the history part (make bide only for routing) and let users decide if they want to use History or HTML5History by using an add-on (such as pushy)?
regarding the error, it could be that my browser (qutebrowser) is old (webkit engine). I'll try with webengine, if the error does not show up there I rename this issue to HTML5History suppport :)
navigate!
I have pushed on master (and 1.3.0-SNAPSHOT
) with html5 support. It can be enabled passing :html5 true
to the opts to start!
function. From now, bide uses Html5History instead of History for all cases (with and without fragment).
works, error in console is gone!
everytime I use navigate! I get the following error entry in the browser console:
it does not break things, but clutters the console output.
it seems that this 'hiddenInput' thing is specific to goog.History Is there a reason why bide does not use goog.HTML5History?