Forum Moderators: phranque

Message Too Old, No Replies

PDF difficulty on one site

very odd

         

txbakers

2:29 am on Dec 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm hosting about a dozen sites on my W2000 IIS server.

I wanted to put a PDF file for download on one site, and it didn't work. The error message was "IE can't find the file or can't download it."

I moved the file to several other websites and tried to download the file and it worked.

I checked the properties of each of the websites, and they were identical to the one I wanted to post it on.

Any ideas? If you want to try, I put the URL in my profile.

Very odd.

jdMorgan

3:54 am on Dec 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



txbakers,

PDF files are of MIME type "application/pdf"
If IIS is in any way similar to Apache, you may need to tell it to add this type info to the server headers to indicate to IE what handler to use.

Two useful tests would be to use the WebmasterWorld server header checker to compare the results of requesting that file from a working and a non-working server, and also to see if you can load that file from the problem server with Netscape or some other browser.

Jim

txbakers

4:09 am on Dec 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Jim. I just checked it in Netscape 7 and it worked flawlessly. I ran the URL through the WebmasterWorld header checker and it returned in 1 second:
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Cache-Control: no-cache
Cache-Control: no-cache
Expires: Sat, 28 Dec 2002 04:05:38 GMT
Date: Sat, 28 Dec 2002 04:05:38 GMT
Content-Type: application/pdf
Accept-Ranges: bytes
Last-Modified: Sat, 28 Dec 2002 01:36:42 GMT
ETag: "031c79211aec21:b4f"
Content-Length: 72114

So, that looks good as well. Did you try it in IE?

The only difference I see in the header check between the "bad" one (above) and a good one is the Cache-Control. There is no cache-control on the working site with IE.

I could add the MIME type to IIS for that site, but it's not specifically added in the other sites either. And it did work in the Netscape 7. So, what should I do?

Thanks.

jdMorgan

5:50 am on Dec 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



txbakers,

I don't really know, but I'm interested in your problem, and I'm an inveterate debugger. IE is known to examine the content of files rather than using MIME type exclusively, so I figured you might find a difference with non-IE browsers.

The cache-control is almost surely an unrelated side-issue, but I favor precise cache control myself; allow caching if it's possible and there is not a good reason not to, then set expiration times that make sense for each type of file. Saves on bandwidth and speeds up the visitor experience. But I doubt very much that this has anything to do with the problem.

Any other differences? Scripts/compression/non-default headers? Does generator Acrobat version number differ between this file and one that works? Just trying to kick out some ideas...

Well, let's see if I can at least bump your thread up and maybe get some IIS experts on-board here. :)

Jim

txbakers

7:12 am on Dec 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks again.

There is no compression on the site, and the PDF file in question is the same file. I just made copies and put it in the other sites. I also tried removing the manually added no-cache from the headers and that didn't help at all either.

HOWEVER..... when I unchecked the box for "Enable Content Expiration" that worked. Why would having an immediate expiration globally on the site cause PDF files to fail? I've no clue.

I don't think I need the no cache at the site level, I do have it coded in the ASP pages where I needed it most. My "site" is really an ASP application served through the browser. I had trouble with pages of old data being cached, and users who would click "update" and see the page refresh itself to the old data. That wasn't good.

Thanks for pointing me in the right direction on this one. The riddle is still there, but the puzzle is solved.

Mike