[thelist] ColdFusion: Forcing Download

Nathan Dintenfass nathan at changemedia.com
Tue Apr 16 12:28:01 CDT 2002

No, I am describing an issue that plays out something like this:

1) you code a page to do what you are trying (download a file)
2) you run the page, but some random error happens
3) you now beat your head against a wall because after fixing the error you just can't get it to behave the way you want.
4) you realize IE is caching the content type (and god knows what else) despite have "check every time" and every cache-busting
thing you can think of
5) you close all your IE windows and try the same page again, and it works!

Knowing about 4 saves you the pain of 3.

Not being able to download again sounds funny.

Is the file still on the server?  You might try the deleteFile="no" attribute of CFCONTENT, though I thought that is the default.

Is there a URL we can try?

 - Nathan

> --- Nathan Dintenfass <nathan at changemedia.com> wrote:
> > One warning: IE will aggressively cache the content type of a URL, so if you have IE open and
> > you ever request the page with this
> > code, you must first close IE and then request the page to get your new content type and other
> > headers to work properly -- yes, that
> > sounds stupid, but blame M$ ;)
> Nathan,
> Once I download a file with your code (which worked beautifully by the way), I cannot download it
> again. Is this the problem with IE you are describing?
> Jon

More information about the thelist mailing list