WordPress.org

Support

Support » Plugins and Hacks » [Resolved] retina not firing on ipad on 1st load

[Resolved] retina not firing on ipad on 1st load

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Jordy Meow

    @tigroumeow

    Yes, it is normal unfortunately. Which method are you actually using?

    html rewrite.

    Un other iOs devices it works form 1st load :/

    Plugin Author Jordy Meow

    @tigroumeow

    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?

    https://github.com/Darkwing371/Adaptive-Images-Uber-Extended/blob/ai-cookie-snippet.js/ai-cookie-snippet.js

    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=/’;

    Plugin Author Jordy Meow

    @tigroumeow

    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.

    This script wouldn’t help to fire retina on the first load neither, not at all, this depends more on the methods on the “other side”. If you use a 100% javascript method (retina.js in the plugin) it would work however.

    Ok, but with adaptive images it works at 1st load, and the only js used is the one to get the cookie

    Plugin Author Jordy Meow

    @tigroumeow

    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

    Plugin Author Jordy Meow

    @tigroumeow

    Added to my to do list…

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] retina not firing on ipad on 1st load’ is closed to new replies.