Skip to content

History.js (html5 bundled) performs page reload if location.hash contains slashes #239

Open
@alvassin

Description

@alvassin

I'm using HTML5 jQuery bundled balupton History.js plugin. It's working fine, but i need to have ability to use links like (works fine without History.js)

http://website/url#popup=/url/some/more/params/
For a moment, if i will try to use it my hash page will be reloaded without hash - i've just tested this in environment with just History.js plugin (to ensure that is a History.js problem).

http://website/popup=/url/some/more/params/
But if i will try hash without "/" symbol, everything will be ok, location.hash will stay unchanged, no page reload will be made:

http://website/#popup=url
Problem is that i would like to use native urls in #popup parameter. It's easy to handle and displayed this way link will be clear to users, everyone will be able to share link after popup is opened.

Is it possible to disable such location.hash change and redirects? I really don't think that using links with special delimeres is good idea:

http://website/#popup=url:param:values
P.S. I've tried to apply encodeURIComponent() to popup url before adding it to location.hash, following url also removes hash and makes redirect:

http://website/#popup%3D%2Ftest%2Furl

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions