Support » Plugin: PageSpeed Ninja » minify JavaScript problem

  • Resolved Greg Robertson


    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:


    Screenshots of my settings:

    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


    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.


    (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).

    Thank you very much!

    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


    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.

    Thanks I’ll try that

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