none
URL with a query string has hash before the query string parameter in IE9 and IE10 RRS feed

  • Question

  • Hi,

    I have a webpage url which looks similar to this

    https://abc.com/xyz?year=2014.

    This URL works fine and the query string reaches the server in Edge(IE11), FF and Chrome.

    But in IE9 the URL becomes https://abc.com/xyz#/?year=2014.

    as the hash tag appears in the URL the query string is not sent part of the http request. It would be great if somebody could guide me what's going on. Thanks

    Ram

    Wednesday, July 15, 2015 4:36 PM

Answers

All replies

  • Hi,

    that # is the hash navigation token. You must have an anchor tag something like this.
    <a href="#" onclick="navigateTo('/xyz' + document.getElementById('inpYear').value);">Report by year</a>

    possibly adding retun false; after the navigateTo call will stop the issue in IE9 emulation mode.

    eg. onclick="navigateTo(url);return false;"

    IE9 does not support the Hash navigation api... use a form>input>submit design pattern instead.
    eg.
    <form action="/xyz/" method="post">
    <label>Report Date:&nbsp;<intput type="text" name="reportdate" value="2014"/></label>

    <input type="submit" value="Run Report"/>

    </form>

    Where possible please include a link to your website, a mashup (jsfiddle) or at least a code snippet with your questions.

    Regards.


    Rob^_^

    Thursday, July 16, 2015 12:35 AM
  • Hi Ramasamy S,

    Please check this blog if it is helpful: URL Fragments and Redirects

    http://blogs.msdn.com/b/ieinternals/archive/2011/05/17/url-fragments-and-redirects-anchor-hash-missing.aspx

    Best regards,

    Shu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, July 22, 2015 3:28 AM