[Resolved] retina not firing on ipad on 1st load
I can’t get retina images to appear the 1st time I load them on an ipad. I’ve tried to put the js generating the cookie directly in the header and dequeue the external js file but it changes nothing 🙁
Yes, it is normal unfortunately. Which method are you actually using?
Un other iOs devices it works form 1st load :/
Strange it works on first load… but actually it shouldn’t. It’s normal for now and we can’t do anything about it. Browsers are evolving and soon there will be a method available that will work directly in a very optimized way. It’s taking time but it’s coming. I already included the src-set method but it only works with Safari and will probably not be the validated method by all the browsers. Wait and see, for now HTML Rewriter is the best imho.
maybe it would help?
I’m using another cookie for adaptive images and it works on ipad, maybe you could compare
document.cookie=’resolution=’+Math.max(screen.width,screen.height)+(“devicePixelRatio” in window ? “,”+devicePixelRatio : “,1”)+’; path=/’;
No, this script does exactly the same thing, here is no difference at all. The only difference is the name of the cookie and the fact it adds the resolution in it but it doesn’t change anything for the pixel ratio.
The pixel ratio is impossible to detect since we would need to know the physical size of the screen as well.
Ok, but with adaptive images it works at 1st load, and the only js used is the one to get the cookie
Actually I would be interested in the reason (programming-wise) of why it works with them and not with the method we are using in the plugin. If you can find that it would be awesome 🙂
I’m not expert enough, sorry :/ but you could try to install their plugin to analyse its code
- The topic ‘[Resolved] retina not firing on ipad on 1st load’ is closed to new replies.