SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2002
    Posts
    168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE6 after file download

    Hi

    I have a prob with IE6 after a file download. It starts on a page, say Page1.php, that links to a download page, say download.php. Page1.php checks that the file exists etc, and links to download.php, which exists only to download the file and consists of the following...

    PHP Code:
    $sPath $HTTP_GET_VARS['path'] ;
    $sFileName $HTTP_GET_VARS['file'] ;
    $sFile $sPath $sFileName;
     
    $sAttachment '';
    if (!
    strstr($_SERVER['HTTP_USER_AGENT'],'MSIE 5.5')) $sAttachment ' attachment;';
      
    header('Content-Length: '.filesize($sFile).'');
    header('Content-Type: application/octet-stream; name="'.$sFileName.'"');
    header('Content-Disposition:'.$sAttachment.' filename="'.$sFileName.'"');
    header('Content-Transfer-Encoding: binary');
      
    //send file contents 
    $oFile fopen($sFile"r"); 
    fpassthru($oFile); 
      
    exit; 
    In IE 5.5 and NS6 this works so that the download starts from Page1.php and, from a user perspective the download is completed they never leave Page1.php. When the download is completed, or cancelled, they can continue browsing from Page1.php. But in IE6 it is like the page is frozen, only after a download is completed. Clicking on a link to another page does nothing. It is not until the Page1.php is refreshed that the browser will continue as expected.

    Any ideas?

    thx

  2. #2
    SitePoint Guru
    Join Date
    Aug 2001
    Location
    Amsterdam
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using a meta refresh after x seconds the first time ...
    the neigbours (free) WIFI makes it just a little more fun


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •