disable zxcvbn.min.js in wordpress and woocommerce

前端 未结 4 1571
别跟我提以往
别跟我提以往 2021-02-10 13:41

As you know zxcvbn.min.js is around 400kb and loaded by default in wordpress websites , I want to know how I can prevent this JavaScript library to load As I don\'t want passwo

4条回答
  •  执笔经年
    2021-02-10 14:38

    So far the wp_enqueue_scripts code is the only solution that actually succeeded in removing the password strength meter files from being loaded. Total page size decreased by about 400KB which was awesome. (841KB to 439KB)

    The problem is adding that code to my functions.php actually slowed down the load time... It caused a 404 error and WebPageTest shows TTFB for that file itself was 900ms after multiple trials.

    On one hand I'm encouraged that something actually blocked the Javascript from being loaded and the total site size being cut in half. On the other hand the code you supplied slowed my site down (from 404 error and TTFB 900ms)

    I just can't believe Wordpress doesn't have a built in option to completely disable this in the admin dashboard. I'm not talking about blocking PW Java from loading on some pages, im saying COMPLETELY GONE.

    If you are the sole user/admin/owner of your website (an don't allow anyone to register) and aren't dumb enough to make your password "1234" there is absolutely no point in having a pw strength meter. It results a big page size and slower load time. My site is 841KB and 400KB is the stupid pw strength meter. So frustrating!

    There are literally thousands of people searching for this solution.

    -cal

    404 error & TTFB

提交回复
热议问题