WordPress.org

Ready to get started?Download WordPress

Forums

BJ Lazy Load
[resolved] Images not shown with Safari desktop browser (7 posts)

  1. AxelPiskulic
    Member
    Posted 11 months ago #

    Hello Bjørn, thank you very much for your work!

    I see that when I visit my site with Safari desktop browser (5.1.7 version) the images are not shown.

    This post is an example: http://en.amarseaunomismo.com/ley-del-dharma/

    It is OK with Chrome, Firefox, Internet Explorer and Opera, but with Safari the images are not shown.

    Thank you very much for any help,

    Axel

    PS: Safari 5.1.7 is the last version for Windows ( http://support.apple.com/kb/DL1531 )

  2. Bjørn Johansen
    Member
    Plugin Author

    Posted 11 months ago #

    Thanks for reporting this Axel. I get the same results as you do on your site, but I can not recreate the bug on my own test site.

    I'll see if I can fix this ASAP.

  3. AxelPiskulic
    Member
    Posted 11 months ago #

    Hello Bjørn,

    I found that the problem was related with CloudFlare service (I use the free CloudFlare service in my sites).

    In CloudFlare settings, in the "Performance settings" tab, there is an option named "Rocket Loader (Web optimization)". If I deactivate this feature, BJ Lazy Load plugin works OK with all browsers, as usual, and also with Safari.

    About this "beta" feature, CloudFlare says that it "Automatically asynchronously load all JavaScript resources".

    I also use the minify option (in CloudFlare) for JS, CSS and HTML files, but this option doesn't cause problems.

    Also I changed the "Theme loader function" (in BJ Lazy Load settings) from "wp_footer" to "wp_head", because during the test in some cases the option wp_footer caused BJ Lazy Load plugin didn't work.

    Thank you again for your plugin!

    Axel

  4. AxelPiskulic
    Member
    Posted 11 months ago #

    Hello,

    Just in case, in the CloudFlare support section I found this tip when you want Rocket Loader ignore individual scripts (without the need to deactivate the Rocket Loader feature) by putting data-cfasync="false" in the script tag:

    https://support.cloudflare.com/entries/22063443--How-can-I-have-Rocket-Loader-ignore-my-script-s-in-Automatic-Mode-

    Here another example:

    https://support.cloudflare.com/entries/22066216-How-do-I-use-Rocket-Loader-with-TypeKit-

    Thank you again Bjørn!

    Axel

  5. Bjørn Johansen
    Member
    Plugin Author

    Posted 10 months ago #

    Great Axel! Thanks for your research and feedback :-)

  6. AxelPiskulic
    Member
    Posted 10 months ago #

    Hello Bjørn,

    Please, could you tell me if it is possible to insert the parameter data-cfasync="false" in the BJ Lazy Load script tag. I think perhaps people that use your plugin is interested in Cloudflare service too (and with the Rocket Loader feature in particular) because both are ways to reduce load time for a website.

    Thank you very much,

    Axel

  7. AxelPiskulic
    Member
    Posted 10 months ago #

    Hello,

    It is not a good solution but I inserted data-cfasync='false' in the BJ Lazy Load script by adding this code to my functions.php file:

    function rocket_loader_attributes( $url )
    {
    $ignore = array (
    
    'http://www.amarseaunomismo.com/wp-content/plugins/bj-lazy-load/js/combined.min.js?ver=0.6.10',
    
    );
    if ( in_array( $url, $ignore ) )
    { // this will be ignored
    return "$url' data-cfasync='false";
    }
    
    return $url;
    }
    add_filter( 'clean_url', 'rocket_loader_attributes', 11, 1 );

    This code works OK, but CloudFlare doesn't ignore the script. I found people with similar problems in some forums: http://stackoverflow.com/questions/15323986/cloudflares-rocket-loader-wordpress-ignore-scripts

    I opened a ticket in CloudFlare about this...

    Axel

Reply

You must log in to post.

About this Plugin

About this Topic

Tags