Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For a long time it was known that IE sends multiple requests for PDF and other MIME types that needs a plugin

Now our server process gives exception because IE suddenly decided to send HEAD requests

Here is the request.

Key                Value
Request            HEAD http://myserver.com/document.pdf HTTP/1.1
Accept             */*
User-Agent         contype
Accept-Encoding    gzip, deflate
Host               myserver.com
Content-Length     0
DNT                1
Proxy-Connection   Keep-Alive
Pragma             no-cache

Has something changed in the processing of other MIME types?

share|improve this question
    
IE has always sent a HEAD request when downloading content for an object tag if the type of that Object is not known. Specify a Type attribute on the object to avoid needing that. Keep in mind that the PDF handler may itself make a HEAD request too. –  EricLaw Jul 30 '13 at 18:06
    
We have handled the get request since IE5 - the change was to a head from get from one version of IE to the next –  mplungjan Jul 30 '13 at 18:45

1 Answer 1

up vote 7 down vote accepted

According to this article:

PRB: Three GET Requests Are Sent When You Retrieve Plug-in Served Content

and this article:

IE Pitfalls: Document “contype” Requests

and someone else with the same problem:

"contype" user-agent making HEAD requests

IE used to make GET requests for content type but now (since IE9? for sure in IE10) has changed to HEAD request.

It is necessary to change your server process to expect a HEAD request. Both HEAD and GET requests with a user agent of contype should only return a content type and not the data

PHP example:

if($_SERVER['HTTP_USER_AGENT'] == 'contype') {
  header('Content-Type: image/svg+xml'); // or application/pdf for pdf
  die();
}
share|improve this answer
    
it seems like this has changed since again, or is dependant on WMP installed on your machine... i'm getting HEAD with regular browser User-Agent and then GET with "Windows-Media-Player/12.0.7601.18150" and one more GET with "NSPlayer/12.00.7601.17514 WMFSDK/12.00.7601.17514" –  Jaroslav Záruba Jun 20 at 14:57
    
We have worse issues - IE is sending a contype, then a request for the full pdf and then I assume the Acrobat plugin requests the same full pdf again –  mplungjan Jun 20 at 16:03
    
aaaaand when i got home here the MSIE won't even list the media requests in the Network panel in DevTools, it plays the WAV, it just won't list the request(s?) made for the damned <EMBED/>... /facedesk –  Jaroslav Záruba Jun 21 at 2:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.