File download in a hidden frame

  • Thread starter Thread starter Pavils Jurjans
  • Start date Start date
P

Pavils Jurjans

Hello,

I made a testcase of the latter described bug here:
http://www.jurjans.lv/dev/050316_dl/ (source download
http://www.jurjans.lv/dev/050316_dl/050316_dl.zip)

I am writing an application, where the users get access to files that are
1) inaccessible directly via the web, thus are streamed via ASP script
2) dynamically generated by ASP script

In both cases the browser must be decently informed about the content type
of the download and the file name so that user doesn't see unpleasant
garbage in the "File download" dialog file name field. I do this using the
following code:

Response.ContentType = "application/msword";
Response.AddHeader("Content-Disposition", "attachment;
filename="+fileName+";");

On the client side, that means that browser attempts to load a page and
actually gets a file download request, thus any page refresh should not
really happen.

To make things look smooth, I used to let this kind of downloads happen into
a hidden frame, to avoid empty page (or empty popup) flickering while
choosing between the open/save options.

However, I have discovered, that if the frameset is a popup window, then
MSIE6 in Windows XP SP2 just violently closes the popup window with the
frameset, if in one of the frames is loaded with the file-downloading
script. I did some testing and find out that MSIE6 on Win2000, and Firefox
1.0 does not act like that.

Any comments on this feature/bug?

Thanks,

Pavils
 
In Pavils Jurjans <[email protected]> had this to say:

My reply is at the bottom of your sent message:
Hello,

I made a testcase of the latter described bug here:
http://www.jurjans.lv/dev/050316_dl/ (source download
http://www.jurjans.lv/dev/050316_dl/050316_dl.zip)

I am writing an application, where the users get access to files that
are 1) inaccessible directly via the web, thus are streamed via ASP
script 2) dynamically generated by ASP script

In both cases the browser must be decently informed about the content
type of the download and the file name so that user doesn't see
unpleasant garbage in the "File download" dialog file name field. I
do this using the following code:

Response.ContentType = "application/msword";
Response.AddHeader("Content-Disposition", "attachment;
filename="+fileName+";");

On the client side, that means that browser attempts to load a page
and actually gets a file download request, thus any page refresh
should not really happen.

To make things look smooth, I used to let this kind of downloads
happen into a hidden frame, to avoid empty page (or empty popup)
flickering while choosing between the open/save options.

However, I have discovered, that if the frameset is a popup window,
then MSIE6 in Windows XP SP2 just violently closes the popup window
with the frameset, if in one of the frames is loaded with the
file-downloading script. I did some testing and find out that MSIE6
on Win2000, and Firefox 1.0 does not act like that.

Any comments on this feature/bug?

Thanks,

Pavils

I clicked the link you provided, clicked every combination of link on the
page, and didn't find anything unusual happening. No closing of windows, no
nothing. This is with the Popup Blocking feature of IE enabled. Was there
some specific setting you wanted me/us to try this with? I'm always willing
to try new things.

Galen
 
Hi Galen,
I clicked the link you provided, clicked every combination of link on the
page, and didn't find anything unusual happening. No closing of windows,
no nothing. This is with the Popup Blocking feature of IE enabled. Was
there some specific setting you wanted me/us to try this with? I'm always
willing to try new things.

The demo should be studied without any plugins such as popup blocker,
installed. I count the built-in popup blocker also a plug-in feature.

If you have enabled poups, you could click on the "Open popup frameset."
link, and then in the just-opened popup window, click the "Download the Word
DOC in a hidden frame". The file download dialog should open, offering you
to Open, Save, or Cancel. When you choose any one of these options, the
popup window with the frameset is violently closed. That's, to my opinion,
is a buggy functionality. As I say, I encounter this only on Windows XP +
MSIE6 + SP2. Windows 2000 + MSIE6 does not have this bug. Also, another PC
in our LAN, which doesn't have SP2 installed, behaves normally (ie, the
popup is NOT closed).

Regards,

Pavils
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top