Welcome GuestLogin

A Drunken Wiki


A Drunken Wiki is the companion wiki to the blog "A Drunken Madman", written by Jason Brown.


Search the wiki

Vaccination Saves Lives: Stop The Australian Vaccination Network

Find me on Twitter, Facebook, Google+, Pinterest and LinkedIn

Pin It

Alpha Archive Atheism Blue Mountains Climbing Cycling Development DotNet GPS Guitar HMHB JavaScript JQuery LINQ Meta MTB Music Perl Powershell RNP SharePoint Skepticism Social Media Training Ukulele Vaccines Visual Studio WebParts Woodford Festival 2011 XML


Safari And Content Disposition

Modified on 2012/02/07 15:51 by Administrator Categorized as Uncategorized
There's an issue using content-disposition headers to stream documents to mac users. This HTTP header is commonly used in server-side scripts to force a "save as" dialog for the end user, allowing a degree of control over how a given file is downloaded. However the incomplete method that works on most browsers appears to fail on Mac Safari.

It's been reported to me as "the dialog pops up but the filename is download.html" what's going on here?

The problem is that the solution I'm looking at is a .NET website, built by someone else, and it appears to default to text/html when no content type is specified. It probably ought to default to no content type according to this link, but as a convenience to ASP.NET developers, it does not.

Looks to me like the content-type needs to be correctly set as well as the content disposition. More on this as I test the solution here.


ScrewTurn Wiki version Some of the icons created by FamFamFam.