balupton/history.js — Issue #153: Force use of HTML4 hash for all browsers?
Author: nickdunn
Created: 2012-01-31 17:50:29+00:00
State: open

This might sound like a silly question, but...

I am building a widget which can be embedded on any page on any website. This widget should maintain internal state, so I am looking at using history.js to retain this. However I am concerned that using the `?param=value` ("HTML5") syntax with true pushstate would be dangerous, given it might be modifying params of any URL the widget is loaded on.

For this reason I feel it would be better if I just uses hashbangs (`#!/param/value` or similar), which is what history.js seems to do for non-HTML5-compliant browsers.

My question is, should I go with `?param=value` and try to sandbox/namespace the param names, or should I fall back to hashbangs completely? And if the latter, is there an option in history.js to _always_ use hashes?