Jimmyt1988
Jimmyt1988

Reputation: 21176

Image in IE11 returned 200 with image data but did not show image. Click show picture, and then it shows

Context (Not sure if relevant):

I have an authentication process with Sharepoint through an iframe... Once that authentication occurs, the image src is reloaded to show the image.

The issue:

If i look in fiddler, I can see the entire authentication process occur... and at the end, i see the image load and return a 200. This request seems to have the image data in it.

In IE 11, the image continued to show as broken. However, i then clicked "show picture" in the context menu, and the image then appeared correctly.

Here is the image request that displayed 200 but didn't show:

HTTP/1.1 200 OK
Cache-Control: private, max-age=86400
Content-Length: 11219
Content-Type: image/jpeg
ETag: "..."
Server: Microsoft-IIS/8.5
Set-Cookie: rtFa=..; domain=sharepoint.com; path=/; secure; HttpOnly
Set-Cookie: FedAuth=..; path=/; secure; HttpOnly
X-SharePointHealthScore: 0
Content-Disposition: attachment; filename=.._com_LThumb.jpg
X-AspNet-Version: 4.0.30319
SPRequestGuid: ..
request-id: .. Strict-Transport-Security: max-age=31536000
X-FRAME-OPTIONS: SAMEORIGIN
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 16.0.0.6001
X-Content-Type-Options: nosniff
X-MS-InvokeApp: 1; RequireReadOnly
P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"
Date: Tue, 13 Dec 2016 11:29:02 GMT

The html of image:

<img width="65" height="65" id="user-profile-picture" onerror="SPImageLoader.ImageErrored(this)" alt="" src="https://something.com/_layouts/15/userphoto.aspx?size=L&amp;url=https://something.sharepoint.com/User%20Photos/Profile%20Pictures/something_com_LThumb.jpg" load-when-authenticated="">

Question:

Can you tell me what kind of things can happen to make this occur? What might have gone wrong?

Upvotes: 1

Views: 173

Answers (2)

Jesper1
Jesper1

Reputation: 78

This is because of the X-Content-Type-Options: nosniff header. IE11 sees that the image content-type is different.

Upvotes: 0

J.Preet
J.Preet

Reputation: 159

Just include

<!--[if gte IE 8]>
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
<![endif]-->

Upvotes: -1

Related Questions