On 11/12/2010, at 1:47 PM, Tim Law wrote:
> > Hello, > > In various websites I download a document and it goes into my Downloads > folder wearing an .aspx extension. > > The only way I can open it is to manually change the extension to .pdf when > Preview will open it without fuss. > > The other solution I have just discovered is that by right clicking on the > link in Mail and selecting 'download linked file', the file appears in my > Downloads folder with a .pdf extension such as ShowPage.aspx.pdf, whereas if > I simply click on the link it comes through as ShowPage.aspx > > I am looking for a solution that doesn't require me to do this as it will > help others in the family, and me! > > Apple Support forums doesn't seem to have come up with any better solution, > and even if I set the 'Open with' in File Info, to Preview, it won't work as > Preview doesn't like the .ASPX extension > > I understand this is a windows file extension and the web site developers > could just as easily create the download in .pdf format which would make it > complaint cross platform. Hi Tim, First …To answer how this is happening. /Quote: That’s a site issue, normally you’d serve aspx files as HTML as that’s the normal output from the server when processing an aspx file, so this would be the default behaviour on the web server. If the aspx file is going to be actually serving something else, it should use the ContentType property of the Response object to set the correct MIME type (application/pdf in this case) to override the default. These websites are not adhering to the Internet Engineering Task Force (IETF) in RFC2616 (Hypertext Transfer Protocol — HTTP/1.1), Section 7.2.1 Type, which states: “Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body. If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI used to identify the resource.” In other words, how a file is processed by a browser should be determined by the Content-Type field in the http Response Header; the file suffix should be ignored when there is a Content-Type field.The Content-Type should be application/pdf not text/html This is often an issue when the folks responsible for the web server often are not aware of all the “rules” and often only check things using IE on Windows. /End Quote: So Tim, to view these files on a Mac you have to change the extension at some stage from .aspx to .pdf (which you have already worked out). When you click on the file in Safari, doesn't a box appear showing the file you wish to save as an .ASPX file … if it does, change the extension then to .PDF and download it. Cheers, Ronni 17" MacBook Pro Intel Core i7 2.66GHz / 8GB / 1067 MHz DDR3 / 500GB Serial ATA Drive @ 7200rpm OS X 10.6.4 Snow Leopard Windows 7 Ultimate (under sufferance) -- The WA Macintosh User Group Mailing List -- Archives - <http://www.wamug.org.au/mailinglist/archives.shtml> Guidelines - <http://www.wamug.org.au/mailinglist/guidelines.shtml> Unsubscribe - <mailto:[email protected]>

