• Resolved Greg Robertson

    (@517design)


    Great Plugin!
    When I turn on Minify JavaScript i get a good ranking in google pagespeed, but it breaks my theme. I took every js file i could find and included all of them in the Exclude Files List hoping my theme would not break and i could eliminate these files one by one until i found the js file that was causing the issue. Here are the files I used:

    
    https://staging.burialinsurance.life/wp-content/themes/visual-composer-starter/js/bootstrap/collapse.min.js
    https//www.google-analytics.com/analytics.js
    https:\/\/staging.burialinsurance.life\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.9.
    https://staging.burialinsurance.life/wp-includes/js/jquery/jquery.js?ver=1.12.4
    https://staging.burialinsurance.life/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1
    https://staging.burialinsurance.life/wp-json/https://staging.burialinsurance.life/wp-content/themes/visual-composer-starter/js/bootstrap/transition.min.js?ver=3.3.7
    https://staging.burialinsurance.life/wp-content/themes/visual-composer-starter/js/bootstrap/collapse.min.js?ver=3.3.7
    https://staging.burialinsurance.life/wp-content/themes/visual-composer-starter/js/slick/slick.min.js?ver=1.6.0
    https://staging.burialinsurance.life/wp-content/themes/visual-composer-starter/js/functions.min.js?ver=3.0
    https://staging.burialinsurance.life/wp-includes/js/wp-embed.min.js?ver=4.9.8
    https://staging.burialinsurance.life/wp-content/plugins/js_composer/assets/js/dist/js_composer_front.min.js?ver=5.6
    https://staging.burialinsurance.life/wp-content/plugins/ninja-forms/assets/js/min/front-end--inputmask.min.js?ver=3.3.19
    https://staging.burialinsurance.life/wp-includes/js/underscore.min.js?ver=1.8.3
    https://staging.burialinsurance.life/wp-includes/js/backbone.min.js?ver=1.2.3
    https://staging.burialinsurance.life/wp-content/plugins/ninja-forms/assets/js/min/front-end-deps.js?ver=3.3.19
    https://staging.burialinsurance.life/wp-content/plugins/ninja-forms/assets/js/min/front-end.js?ver=3.3.19
    https://staging.burialinsurance.life/wp-content/plugins/ninja-forms-style/layouts/assets/js/min/front-end.js?ver=3.0.25 
    

    Screenshots of my settings:
    https://gyazo.com/015448c44c0d9e1c34b14a9b37716735
    https://gyazo.com/3a90f25f4119f5d9d9a959f10b6f0a84
    https://gyazo.com/cfcffbd8b7cdc1886473a4d85dc23a2e

    Is there a setting I need to change?
    Am I putting the js files in the Exclude Files List incorrectly or adding the wrong files?

    Thanks, Greg

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Denis Ryabov

    (@dryabov)

    As to the Exclude Files List, it is based on a partial matching, so it is sufficient to set just a path without protocol and domain name, e.g.

    /wp-content/themes/visual-composer-starter/js/bootstrap/collapse.min.js

    (moreover, javascript files may be actually loading via relative paths)

    And, of course, you can disable merging of javascript at all (but it would be better to found which file leads to the error and exclude them only).

    Thread Starter Greg Robertson

    (@517design)

    Thank you very much!

    Thread Starter Greg Robertson

    (@517design)

    Just to be thorough how do i find every js file my site is using?

    and what about the scripts in the head that are not links, do i copy and paste the whole script into Exclude Files List?

    thanks again

    Plugin Author Denis Ryabov

    (@dryabov)

    Currently there is no easy way to specify inlined script to don’t be merged, except of disabling of merging of all inlined javascripts.

    But there are two tricky ways:
    1) add ress-safe attribute to the script tag to skip this js (allowing prior and next javascripts to be merged into a single file), and
    2) add data-cfasync=false attribute to disable optimization of this js and preventing merging of prior and next javascripts to avoid possible dependence-related issues.

    Thread Starter Greg Robertson

    (@517design)

    Thanks I’ll try that

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘minify JavaScript problem’ is closed to new replies.