Browser behaviour in javascript redirect!

Discussion in 'Javascript' started by umaildaksh@gmail.com, Aug 11, 2008.

  1. Guest

    Hi,
    Firstly i hope am postin in the right group.If not my sincere
    apologies.I need some help with the behaviour of browsers when the
    back button is pressed incase of javascript redirection.

    when i fetch the url" www.orange.fr" in IE7 and click on "messagerie"
    anchor link request for URL : http://r.orange.fr/r/Owebmail_inbox_v2
    is sent. I get the response as HTTP/1.1 302 D.plac. Temporairement and
    am
    redirected to location http://webmail16.orange.fr/webmail/fr_FR/sso_redirect.html?URI=inbox.html.
    IE then sends the request for the redirected URL and the response got
    is :



    <html>

    <head>

    <title>mail Orange</title>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <script language="JavaScript">

    var url = "http://id.orange.fr/auth_user/bin/auth_user.cgi?
    service=communiquer&url=http://webmail16.orange.fr/webmail/fr_FR/
    inbox.html";

    function loadPage()

    { .self.location = url; }

    </script>

    </HEAD>

    <BODY onLoad="loadPage();">

    </body>

    </html>

    Due to this Javascript, immediately a request for the URL--http://
    id.orange.fr/auth_user/bin/auth_user.cgi?
    service=communiquer&url=http://webmail16.orange.fr/webmail/fr_FR/
    inbox.html is made.Response is got for the same and the page is
    loaded.

    However,now there is a problem on pressing the back button in IE.Due
    to the Javascript the same URL
    http://id.orange.fr/auth_user/bin/a.../webmail16.orange.fr/webmail/fr_FR/inbox.html
    is loaded again.This process keeps on repeating.

    In Firefox however--on pressing the back button we return to the main
    page i.e www.orange.fr

    In Safari for windows--On pressing back the first time, the same page
    (http://id.orange.fr/auth_user/bin/auth_user.cgi?
    service=communiquer&url=http://webmail16.orange.fr/webmail/fr_FR/
    inbox.html) is loaded.
    On pressing 2nd time a blank page is shown for the URL
    http://webmail16.orange.fr/webmail/fr_FR/sso_redirect.html?URI=inbox.html
    For the 3rd time, the homepage(orange.fr) is shown.

    In case of such a javascript what is the correct and expected
    behaviour of a browser as all 3 of these browsers show different
    behaviours.Also, could anyone lead me to http or maybe even html
    specifications stating the correct behaviour, as i cudnt come across
    any.

    Thanks and Regards,
    Daksh.
     
    , Aug 11, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Chambers
    Replies:
    1
    Views:
    395
    Daniel Dyer
    May 14, 2007
  2. msdngroup
    Replies:
    5
    Views:
    721
    msgroup
    Jan 30, 2008
  3. Replies:
    0
    Views:
    872
  4. Sal
    Replies:
    1
    Views:
    807
  5. Simon Wigzell

    Browser "Back" fails after javascript redirect?

    Simon Wigzell, Oct 2, 2003, in forum: Javascript
    Replies:
    3
    Views:
    109
    Lasse Reichstein Nielsen
    Oct 2, 2003
Loading...

Share This Page