Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Figure out getHash vs getFragment solution #8

@geekdave

Description

@geekdave

We use this code to trigger a new subroute immediate upon initialization:

        // grab the full URL
        var hash = Backbone.history.getHash();

        // Trigger the subroute immediately.  this supports the case where 
        // a user directly navigates to a URL with a subroute on the first page load.
        Backbone.history.loadUrl( hash );

For some, only getHash() works. For others, only getFragment() works.

I haven't had the time to track down why, since some of these cases involve using push state, which I am not using in any projects. If anyone can help out with getting to the bottom of this, it would be a big help.

Some discussion on the issue, and a previous pull request, can be found here.

Thanks to @jtuulos and @MMRandy for your feedback so far.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions