Redirection problem in IE6

Discussion in 'PHP' started by amold, Jul 23, 2009.

  1. #1
    Hi,

    We are facing one problem only on IE6. We have used one javascript code for redirecting page after user is login. It works fine on other browser, but on IE6 after user is logged in it is showing blank page and after refresh it will show the appropriate page.

    JavaScript code:
    window.location.href='page_name.php'

    First we thought this is problem only for JavaScript but we created one test php page and added only three links by clicking on the link it will go to the site, but on first instance it is showing blank page on IE6.

    We have some other sites on same server and they all are working fine with the same code, only one domain is giving problem in IE6.

    I am using javascript only when user is logged it.

    But if I click on the "index.php" which is not javascript is a simple link still it is displaying blank page on IE6. :(

    Does it is related to some settings for that Domain in Apache or it is something else?

    Waiting for reply...

    Thanks in advance.

    Regards,
     
    amold, Jul 23, 2009 IP
  2. AlilG

    AlilG Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    do you have using of Gzip compress on your php page?
    sometimes when your page strings is too short, ie6 displays blank page!
    add more string to your php file like
    
    <!--
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    -->
    
    Code (markup):
    may it help you!
    previously i had a problem like this! ie6 display blank page! when i add more content to it, it worked!
    OR disable gzip compression!
     
    AlilG, Jul 23, 2009 IP
  3. blake3334

    blake3334 Member

    Messages:
    407
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #3
    Amold, why are you using javascript to redirect the user after a login when you can simply do it in php?
     
    blake3334, Jul 24, 2009 IP
  4. qualityhostings

    qualityhostings Well-Known Member

    Messages:
    1,764
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    105
    #4
    use
    for redirecting instead of javascript
     
    qualityhostings, Jul 24, 2009 IP
  5. amold

    amold Guest

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi All,

    Thanks for your valuable replies.

    I am using prototype.js and sending request to one of the php file which will do some processing and will redirect to appropriate page after user is successfully log's in.

    But even if I click on "index.php" link which is a simple link and not javascript still it is showing me blank page first and it does not change the URL in the address bar.

    First I thought that it is due my coding error or something else. Then I created two pages in first page was simple HTML some text written in it and named as index.php and then uploaded it on server and other page I have created three links

    1) First link is http://www.sitename.com/
    2) Second link is http://www.sitename.com/index.php
    3) Third link is index.php

    but I found that none of the links were working as per requirement.

    Regards,
     
    amold, Jul 24, 2009 IP
  6. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #6
    window.location.href='page_name.php'

    Is native javascript and does not require prototype at all.

    Likewise you can do window.open('page_name.php', '_self');

    So the way you're trying to redirect, its kind of a waste to include prototype, though I would prefer JQuery.

    If it's a redirect that happens right after logging in, you can simply use header("location:page.php"); in php
     
    kblessinggr, Jul 24, 2009 IP
  7. spc

    spc Well-Known Member

    Messages:
    136
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    125
    #7
    Both javascript and php can be used for redirection, but below I want to show a simple technique in HTML and javascript that I have used for redirection..


    
    <form name='frm' method='post' action='index2.php' target='_self'>
    <input type='hidden' name='verify' value='1' /></form>
    <script>document.frm.submit();</script>";
    
    Code (markup):
    Just making the form submission automatic using javascript. Simple, huh?
     
    spc, Jul 24, 2009 IP
  8. amold

    amold Guest

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hi All,

    I have created the test page.

    www dot cvpartnersllc dot net slash test_cv dot php

    Please have a look on IE6 where it is showing blank page.

    Regards,
     
    amold, Jul 27, 2009 IP
  9. amold

    amold Guest

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    To be more specific.

    Even simple link "index.php" first show blank page in IE6 and after refresh it will show the content for the same page.

    This happens only on IE6 rest of the browser works well
     
    amold, Jul 27, 2009 IP