Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6162913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:44:13+00:00 2026-05-23T21:44:13+00:00

Here’s a scenario that describes the problem: User A has a browser with HTML5

  • 0

Here’s a scenario that describes the problem:

User A has a browser with HTML5 state support, and sends this link to User B:

http://domain.tld/node

User B, who uses a browser without HTML 5 state support, navigates to another node, and sends the link back to User A:

http://domain.tld/node#!/another-node

But when User A clicks the link, the content for /node is shown instead of /another-node.

Querying Asual’s jQuery $.address() plugin shows that it is interpreting the “hashbang address” as the hash value:

> $.address.value()
  "/node#/another-node"
> $.address.path()
  "/node"
> $.address.hash()
  "/another-node"

(Curiously the “!” is dropped from the hashbang.)

Can this ambiguity be overcome with a change in my implementation?

I could disable support for the history API if a hashbang is found in the URI, but I’d rather not.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:44:14+00:00Added an answer on May 23, 2026 at 9:44 pm

    I was able to solve this issue by changing my implementation a bit.

    Basically, I determine what the address should be based on the browser’s capabilities, check that against what the address actually is, and if it doesn’t match, use location.replace() to replace the address without creating a new history entry.

    var addressValue = $.address.value(),
        initPath = window.location.pathname.replace(stateBasePath, ""),
        newLocation = baseUrl +stateBasePath + (supports_history_api() ? "" : "/#!") + (addressValue != "/" ? addressValue : initPath + window.location.search);
    if (newLocation != window.location.href) {
        window.location.replace(newLocation);
    }
    

    This code should be executed as soon as possible – outside of a DOM ready function.

    • stateBasePath is equivalent to the value you would use for $.address.state() (just an empty string if the site is located at the document root)
    • baseUrl is the URI protocol and domain, e.g. http://domain.tld (no trailing slash)
    • supports_history_api() is a little ditty taken from Mark Pilgrim
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's a coding problem for those that like this kind of thing. Let's see
Here's the problem....I have three components...A Page that contains a User Control and a
Here's my scenario - I have an SSIS job that depends on another prior
Here is the scenario: I'm writing an app that will watch for any changes
Here's my problem I have this javascript if (exchRate != ) { function roundthecon()
Here's the flow that I am trying to achieve: 1) User uploads an audio
Here is another spoj problem that asks how to find the number of distinct
Here's the scenario: I have a local git repository that mirrors the contents of
Here's the situation, i want to have a user that can enter time on
Here is my problem...I have a page that loads a list of clients and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.