• Reduce unused JavaScript 1.37s

    s/dflip.min.js?ver=1.7.35 37.5 KiB

    Loads all the time, even in page dflip NOT used. This is wrong, and means google will penalize the whole site if the plugin is installed.

    • This topic was modified 10 months, 2 weeks ago by mayy3321.
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author DearHive

    (@dearhive)

    Hi,

    We have thought about this a lot of times. In fact we too think similarly. We too want to reduce the time and loading of the file.

    But the available solutions do not play well and we are still searching for a proper solution.

    1. Scanning for shortcodes in the content before adding the scripts: This is a common method, fails miserably when there is Ajax based content used in the site.
    2. Using iframe to display flipbooks instead of embedding: This is a method how YouTube displays videos. But then CSS customizations cannot be done.

    If we are able to get a solution that doesn’t have serious side effect we will add it. If this is a huge problem to you, we suggest you to try another plugin for time being.

    Best Regards,

    DearHive

    Thread Starter mayy3321

    (@mayy3321)

    I see. Well I think you can add an option button: Scanning for shortcodes in the content before adding the scripts

    If they use ajax, they turn it off.

    There, fixed for 98% cases for now.

    Several other Special feature type plug-ins have an option that says whether to use scripts on all pages or only where it’s used.

    • This reply was modified 10 months, 1 week ago by mayy3321.
    Plugin Author DearHive

    (@dearhive)

    Several other Special feature type plug-ins have an option

    Can you point out some, that you have experienced.

    • This reply was modified 10 months, 1 week ago by DearHive.

    In terms of a potential solution in the future, if the plugin used a block to output the viewer, then the script could only be loaded when the block is present. That combined with a new setting like “Improve site performance by not loading script unnecessarily (only supports dFlip block)” might work!

    Thread Starter mayy3321

    (@mayy3321)

    I can’t remember the exact plugins, I have trimmed down a lot now.

    But just simple checkbox

    on: js in all pages

    off: js only if detected

    Plugin Author DearHive

    (@dearhive)

    We have added an option in upcoming 2.1 Full version.

    View post on imgur.com

    Selective Script Loading : Load Scripts only on pages where shortcodes are added. May not work properly in AJAX based themes. Also clear your CACHE PLUGIN CACHE

    There are drawbacks. But since it disabled by default. Users will have an idea how it will work they change the option. We will improve on this as the feedbacks will star coming.

    • This reply was modified 10 months, 1 week ago by DearHive.
    • This reply was modified 10 months, 1 week ago by DearHive.
    Thread Starter mayy3321

    (@mayy3321)

    Hi

    This is still not out?

    Plugin Author DearHive

    (@dearhive)

    It was released on full version 2.1 as mentioned in our previous comment.

    Thread Starter mayy3321

    (@mayy3321)

    yes now 4 months have passed and:

    • Version:2.0.86
    • Last updated:2 months ago

    When will the update come?

    Plugin Author DearHive

    (@dearhive)

    Hi,

    2 months ago we mentioned it was released in version 2.1 Full version. This is lite version and it does not have that feature. Because Selective Script Loading is not common solution for every user.

    Best Regards,

    DearHive

    Thread Starter mayy3321

    (@mayy3321)

    I see, it’s unfortunate I helped you fix your code, and you make it a paid feature. It’s standard not to load unused code since, erm, 8-9 years ago. But I see you are not, so I’ll find another solution.

    I’m not sure why you think that all users of DearHive PDF Flipbook, 3D Flipbook – DearFlip will be penalised by Google for site speed and coding is a good solution. I would not recommend it to any users to see their site penalised when using DearFlip.

    Plugin Author DearHive

    (@dearhive)

    Hi @mayy3321,

    We can give you a lifetime full version. You can contact at support@dearhive.com

    But, this feature cannot be added into this test version. Reason is same what I have been mentioning since first reply. This solution is not fullproof and not reliable and we do not recommend using this setting at all. We do not like promising “can-fail” solution/features nor we like to recommend ourselves.

    3D Flipbook is a heavy plugin so ~50kb shall be a valid tradeoff. We score 97 on Pagespeed despite having this plugin active on the page:
    https://pagespeed.web.dev/analysis/https-wordpress-dearflip-com/j12mnwfd83?form_factor=desktop
    It’s about best practices, not just standards.

    But if any users find better plugin that has better pagespeed and optimization than our plugin. We honestly recommend to use that plugin.

    Plugin Author DearHive

    (@dearhive)

    Hi,

    We have a version https://downloads.wordpress.org/plugin/3d-flipbook-dflip-lite.2.2.39.zip that has Selective Script Loading added. It is still not officially release.

    It’s under Global Settings-> Advanced-> Selective Script Loading.
    Set it to true and clear any cache you have.

    Let us know how it goes.

    Best Regards,
    DearHive

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.