Hi,

I've found what I think is a bug in Internet Explorer, which I really need to be able to get around.

Here's the problem:

header("location: [url]http://www.mysite.com/page.php?var=something#bookmark[/url]");

This redirect in internet explorer will redirect to page.php, BUT the $_GET["var"] variable will equal this:

echo $_GET["var"];

//produces:  something#bookmark

For some reason in IE, the bookmark is tacked onto the end of the variable! This is so anoying, and it doesn't happen in other browsers like mozilla.

If I now hit refresh in IE, the page will reload but the bookmark won't be tacked on the end:

echo $_GET["var"];

//produces:  something

I don't even know what's causeing this? I suppose it must be a IE bug, but how? Why when I refresh the page is it ok?

I hate IE!! But I have to get this working, so if you know what can be done to get around this please let me know. Thanks.

Also the version IE I have tested this on is 6.0.2800.1106. I am sure it has worked before on IE maybe another version, but I can't remember.

Thank you,
-Adam 🙂

    Sorry, should have turned off the auto parse URL thing.

    This is the sort of redirect I'm trying to do:

    header("location: http://www.mysite.com/page.php?var=something#bookmark");
    

      Does no one know what I'm talking about?

      Surely this would have came up with someone else before...

      Thanks
      - Adam 🙂

        a year later

        I've got the same issue - apaprently nobody knows yet! Let me know if you find anything. I'd hate to remove a bookmark this way, but here is one idea:

        include a get variable that you use via Java or something to redirect in the page itself.

          GOT IT! (For my issue anyway)

          IT DIDN'T WORK IN IE WHEN THE SUBMIT TYPE WAS AN IMAGE, BUT AS TYPE "SUBMIT" IT WORKS!

          (So, when submitting something for a header redirect, use a regular button so that IE doesn't screw it up for you)

          DAMN YOU BILL GATES

            Write a Reply...