Support » Plugin: Autoptimize » Can’t Remove zxcvbn.min.js

  • Resolved kidnhockit



    I wanna remove zxcvbn.min.js.
    I use scrpit:
    function iconic_remove_password_strength() {
    wp_dequeue_script( ‘wc-password-strength-meter’ );
    add_action( ‘wp_print_scripts’, ‘iconic_remove_password_strength’, 10 );

    But I can’t remove.
    JS load to autoptimize/js/autoptimize_988278c70502de8a00fbc1916e213f6b.js:185

    Help me,

    Thank you !!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Optimizing Matters


    can you share your website’s URL so I can take a quick look @kidnhockit ?

    Hi ^^

    My website:

    Thank you <3

    Plugin Author Optimizing Matters


    well, looking at the source of your un-autoptimized homepage (you can disable AO on a per-request basis by adding ?ao_noptimize=1 to the URL), I still see;

    <script type='text/javascript'>
    /* <![CDATA[ */
    var _zxcvbnSettings = {"src":"https:\/\/\/wp-includes\/js\/zxcvbn.min.js"};
    /* ]]> */
    <script type='text/javascript' src=''></script>

    so your dequeuing is not working, which explains why AO is still aggregating the file as well.

    where/ how did you add that code snippet?

    I add code to Functions.php of Flatsome (Child-Theme).

    • This reply was modified 1 year, 6 months ago by  kidnhockit.
    Plugin Author Optimizing Matters


    well, for reasons I don’t know it isn’t working I’m afraid. thought about trying this on my local dev-machine, but can’t seem to find the woocommerce option that triggers this being added in the first place?

    what you could do (but this is a “nuclear” option is use this code snippet to let AO zap all of that password-strenght stuff (it removes and JS that has zxcvbn or password-strength in the filename or if inline JS in the code);

    function remove_zxcvbn_js($in) {
        return $in . ", zxcvbn, password-strength";

    to be clear; this can break things, so it would be better to fix whatever is breaking your original snippet. and if you do use it; test your site thoroughly!


    Thanks a lot,
    I will check my website.
    I will report on success.
    Thank you again.



    Did you find a solution?
    Im having the same problem.


Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can’t Remove zxcvbn.min.js’ is closed to new replies.