You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Safari in iOS8 image placement

On many different webpages, pictures seem to show up in the wrong place. On one page there's a group of my friends and their avatars, but a few of the avatars are from pictures located else where on the page. On a page with many pictures, I find that some pictures repeat, while others don't show up at all. Could this be related to the pic uploaDing problems I've seen discussed elsewhere?

iPad, iOS 8, Downloaded latest iOS

Posted on Oct 1, 2014 2:19 PM

Reply
76 replies

Dec 18, 2014 1:13 PM in response to davidburleson

I too have found this problem, really only on one site that my partner and I are building. I haven't noticed it on others, but it is a real problem. This is the first thread that I found that addresses the problem. I'm glad I found it because I thought it was just me.


What is everyone writing in the bug report they are sending to apple? Images are being randomly replaced or not appearing at all?


I downloaded Chrome for my iPhone 6 to test it and of course Chrome works perfectly. Now if I can just get everyone who will see my client's site on their iPhone to download Chrome....

Dec 18, 2014 4:46 PM in response to MDS Design

I have updated both my iPhone and my iPad to 8.1.2. I am still having this issue on both, mostly when I have visited the site on WiFi then I visit the same site on LTE. It mostly happens on sites that I frequent very often so it must have something to do with caching.


I reported this to Apple. I have mostly seen the issue where images are completely swapped and load in the incorrect location. But I have seen where the images don't load and a blank white box loads instead. I have also seen when an image half loads and the portion of the image that doesn't load is black.


Chrome on the iPad and iPhone loads everything perfectly so this is definitely an iOS issue.

Jan 10, 2015 5:19 AM in response to burnodo

Potential Workaround Found!


Background:

So I had a website I was working on that was experiencing this problem pretty badly. I found that some phones were more likely to exhibit the behavior than others. I used the phones that were the worst offenders, and performed the following steps to be able to somewhat reliably reproduce the issue. Even on the worst phones, while following these steps, I was only able to get 50% reliability on reproducing the issue, so with all code tests, I'd recommend repeating the steps several times to determine if a change had been made.


Steps to reproduce:

  1. Open page that is exhibiting the issue in Safari Mobile on iOS8
  2. Close Safari
  3. Reopen Safari (should by default bring you back to the page)
  4. Check this page very carefully for misplaced.
  5. Close Safari, and repeat steps 3-5.
  6. On the worst phones, this would happen 50% of the time, so I would have to repeat the entire process several times to confirm / deny whether or not what I did was helping the issue.

Cause:

I'm not sure if it's the same cause for all of you, but in my case, it resulted from a specific set of response headers associated with a CSS file. When present, the problem would appears 50% of the time, once removed, the problem has not returned. The way I determined this, was removing all scripts / style assets from the page and found that the the issue disappeared. I then slowly started reintroducing assets until the problem returned, and looked very closely at the files.


I was able to get even an empty .css file, to cause the image swapping bug, if the response headers were as follows:

Bad:

Cache-Control:no-cache

Connection:close

Content-Encoding:gzip

Content-Type:text/css;charset=UTF-8

Date:Sat, 10 Jan 2015 13:08:36 GMT

Server:Apache/2.2.15 (Red Hat)

Vary:Accept-Encoding

X-Powered-By:PHP/5.4.28


Fix:

I removed the special handling associated with the file, and got these were the default headers that were sent with the file, and it worked:

Good:

Connection:Keep-Alive

Content-Encoding:gzip

Content-Length:234

Content-Type:text/html; charset=UTF-8

Date:Sat, 10 Jan 2015 13:09:13 GMT

Keep-Alive:timeout=8, max=200

Server:Apache/2.2.15 (Red Hat)

Vary:Accept-Encoding

X-Powered-By:PHP/5.4.28


I believe the issue was related to either the no-cache, or the lack of content-length, but in either case, this triggered the bug within Safari to start swapping images.


Your mileage may vary, but hopefully the above will help, good luck!

Mar 12, 2015 2:00 PM in response to TimDix

I don't know may headers all seem fine I'd i'm still getting the image swap often. This is driving me nuts.


Remote Address:12.34.56.78

Request URL:http://www.example.com/file.css

Request Method:GET

Status Code:200 OK


Accept-Ranges:bytes

Cache-Control:public, max-age=604800

Connection:Keep-Alive

Content-Encoding:gzip

Content-Length:3897

Content-Type:text/css

Date:Thu, 12 Mar 2015 20:53:04 GMT

Expires:Thu, 19 Mar 2015 20:53:04 GMT

Keep-Alive:timeout=5, max=100

Last-Modified:Thu, 19 Feb 2015 18:20:10 GMT

Server:LiteSpeed

Vary:Accept-Encoding

Apr 3, 2015 4:20 AM in response to ahmed.hany

Upgraded to 8.2 on iPad and still not fixed. Quite tedious. Apple should be ashamed.


Only workaround I've told my users is to "Preview" any Wordpress postings in the Wordpress app and for "non-authors" install Chrome for those sites that have a known issue - in both apps the images are in the correct location.


(If only we could change the default browser)

Apr 13, 2015 12:46 AM in response to burnodo

iOS 8.3 and I can confirm that the bug is still there. My cookies are set as default cookies are for safari, which is important as this will be the way most people will have their devices setup. I've also confirmed that my site's headers for images and other assets are correct. The only way to prevent the problem is to switch HTTP pipe-lining off completely on my web server, which isn't a solution.


We all need to get Apple's attention to this bug. I submitted a bug report in Radar and it was just closed, no reason or explanation. I also put it on OpenRadar and that's not really helped either.


Can anyone else suggest how we can bring this to attention? What if we all submitted a bug report with the same subject (ie: Image Swapping Issues in Safari IOS8)?

Safari in iOS8 image placement

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.