Title: Unloading JS
Last modified: August 2, 2021

---

# Unloading JS

 *  Resolved [Thomas](https://wordpress.org/support/users/goldenshawarma/)
 * (@goldenshawarma)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/unloading-js/)
 * Hi Team,
 * I hope you are having a great week so far.
 * Currently, I am optimizing my website, and I want to minimize around 100+ requests
   from the Homepage.
 * Right now I am exploring the plugin and I want to ask some questions.
 * I tried unloading a specific JS from an external plugin via the plugin settings(
   see screenshot below), however I am getting a message saying the “The link has
   expired”
 * [Screenshot](https://paste.pics/DEH79)
 * After clicking “Update” button, I am getting a message (see screenshot below)
 * [Screenshot](https://paste.pics/DEH8N)
 * Am I missing a configuration step? Or what is causing this message?
 * Cheers!

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/unloading-js/#post-14731753)
 * [@goldenshawarma](https://wordpress.org/support/users/goldenshawarma/) the reason
   you keep getting that error is that there are too many submitted fields and some
   of them are stripped from the POST request. I’m sure the max_input_vars value
   from php.ini is a low one. I would consider updating it to at least 3000.
 * Please check the following post which is written by the WooCommerce team: [https://docs.woocommerce.com/document/problems-with-large-amounts-of-data-not-saving-variations-rates-etc/](https://docs.woocommerce.com/document/problems-with-large-amounts-of-data-not-saving-variations-rates-etc/)
 * Although they reference their own plugin, the same thing applies to Asset CleanUp
   Pro and any other plugin that adds fields to a form. You might have in the edit
   post/page area (e.g. the one having the URI: _/wp-admin/post.php?post=[POST\_ID\
   _HERE]&action=edit_) fields added by various plugins and when you submit the 
   form, you will end up with some of the fields getting stripped.
 * I hope you’ll make the right change! Let me know how it goes! It should solve
   the problem you’re having! That error (The link has expired) is shown because
   the security nonce field – read more here: [https://codex.wordpress.org/WordPress_Nonces-](https://codex.wordpress.org/WordPress_Nonces-)
   is stripped and not sent for the plugin to verify it, thus having an empty value,
   the changes are not applied.
 *  Thread Starter [Thomas](https://wordpress.org/support/users/goldenshawarma/)
 * (@goldenshawarma)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/unloading-js/#post-14731869)
 * [@gabelivan](https://wordpress.org/support/users/gabelivan/)
 * Thank you for the advice! I will change the PHP system variable as per instruction&
   I will let you know the result.
 * Cheers!
 *  Thread Starter [Thomas](https://wordpress.org/support/users/goldenshawarma/)
 * (@goldenshawarma)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/unloading-js/#post-14731966)
 * Hi [@gabelivan](https://wordpress.org/support/users/gabelivan/)
 * I changed the parameter value in the .htaccess file (see screenshot below)
 * [.htaccess file screenshot](https://paste.pics/DF32L)
 * I changed the parameter value in the php.ini file (see screenshot below)
 * [php.ini Screenshot](https://paste.pics/DF33D)
 * If it still makes sense, I changed it in the wp-config file (see screenshot below)
 * [wp-config file screenshot](https://paste.pics/DF34J)
 * So I tried unloading a JS from the plugin, but I am still getting “The Link you
   followed has expired” message.
 * [Screenshot](https://paste.pics/DF353)
 * I am not sure what am I missing here.
    -  This reply was modified 4 years, 10 months ago by [Thomas](https://wordpress.org/support/users/goldenshawarma/).
 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/unloading-js/#post-14738922)
 * [@goldenshawarma](https://wordpress.org/support/users/goldenshawarma/) can you
   check if the changes you made actually applied? Create a file such as info-437a4g42m34.
   php (e.g. a name hard to guess so only you could access it, you can delete the
   file later on) and put it in the WordPress root directory. The contents would
   be `<?php phpinfo(); ?>`. Then, load it in your browser and search on the page(
   e.g. command + F via MacOS): “_max\_input\_vars_“. If no change was made, you
   need to contact your hosting company about this as they might have restrictions
   on it.
 * Did you reboot the server after php.ini was updated? That’s what you need to 
   do. Then, reload the CSS/JS manager and re-submit the form.
 * Roughly, how many CSS/JS assets do you have there? I mean, 3000 is a fairly high
   value to use for “_max\_input\_vars_“. You would need to have an unusually large
   number of CSS/JS loaded so that you would need to put a higher value there. Also,
   please use the manager from “CSS & JS Manager” -> “Manage CSS/JS” because it 
   has fewer fields. If you use the one from the edit post/page area (e.g. _/wp-
   admin/post.php?post=[POST\_ID\_HERE]&action=edit_), it has more fields, including
   the fields appended by other plugins.
 *  Thread Starter [Thomas](https://wordpress.org/support/users/goldenshawarma/)
 * (@goldenshawarma)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/unloading-js/#post-14739588)
 * Hi [@gabelivan](https://wordpress.org/support/users/gabelivan/)
 * Apologies, it took me a while to perform the instructions you had sent to me.
 * Ok, so I was able to create a file and put it into the root directory.
 * I was able to render the system info function (see screenshot below)
 * [See Screenshot](https://paste.pics/DFVPB)
 * The value for max_input_vars is 1000, although I should be expecting a value 
   of 3000.
 * I already rebooted my Litespeed Server, which I host in my own VM machine in 
   Google Cloud Platform hoping that the parameter change will take into effect.
 * And then I tried unloading a JS from a plugin I used for my checkout page in 
   Woo (I am wondering why the JS is loaded/rendered on every page – a shocker).
 * [JS script I am trying to unload](https://paste.pics/DFVRI)
 * I am still getting the same error notification. I’ll try to revisit the parameter
   settings of max_input_vars.
 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/unloading-js/#post-14739607)
 * [@goldenshawarma](https://wordpress.org/support/users/goldenshawarma/) in this
   case, it’s best to reach out to the hosting company. I know it can be frustrating,
   but they can explain to you if there’s any limitation on your account and they
   would be able to do the change for you.
 * Also, did you try to do the update from the _“CSS & JS Manager” – “Manage CSS/
   JS area”_? If it still doesn’t work, iut means you have an aweful lot of handles
   there that when you add them up, including the hidden fields, it goes over 1000
   inputs.
 *  Thread Starter [Thomas](https://wordpress.org/support/users/goldenshawarma/)
 * (@goldenshawarma)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/unloading-js/#post-14739639)
 * Hi [@gabelivan](https://wordpress.org/support/users/gabelivan/)
 * Thanks for the information. When you say “handles”, do you mean JS requests (
   because on my homepage, I have like 200 requests, ugh) or in the context of the
   plugin?
 *  Thread Starter [Thomas](https://wordpress.org/support/users/goldenshawarma/)
 * (@goldenshawarma)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/unloading-js/#post-14739992)
 * Hi [@gabelivan](https://wordpress.org/support/users/gabelivan/)
 * I was able to change the max_input_vars via CyberPanel (there is a section for
   changing PHP config) and I changed the value there and restarted the PHP service
 * [PHP Config in CyberPanel](https://paste.pics/DFX7M)
 * Now the value of the parameter max_input_vars is 3000 and went straight to the
   plugin settings to unload a JS.
 * [System Info Screenshot](https://paste.pics/DFX89)
 * Now I am able to unload the JS successfully.
 * [Asset Cleanup JS Manager](https://paste.pics/DFX8H)
 * [Asset Cleanup JS Manager Screenshot 2](https://paste.pics/DFX8R)
 * Thank you very much for your guidance! Cheers and have a great weekend hermano!
 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/unloading-js/#post-14744913)
 * [@goldenshawarma](https://wordpress.org/support/users/goldenshawarma/) that’s
   fantastic news! I’m glad you finally managed to perform the unloading. I’m sure
   the updating of “max_input_vars” will help you out in other situations, outside
   Asset CleanUp.
 * PS: If you’re happy with the plugin overall, it would be great if you can spare
   a minute and leave a quick review about it here: [https://wordpress.org/support/plugin/wp-asset-clean-up/reviews/#new-post](https://wordpress.org/support/plugin/wp-asset-clean-up/reviews/#new-post)

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Unloading JS’ is closed to new replies.

 * ![](https://ps.w.org/wp-asset-clean-up/assets/icon-256x256.png?rev=1981952)
 * [Asset CleanUp: Page Speed Booster](https://wordpress.org/plugins/wp-asset-clean-up/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-asset-clean-up/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-asset-clean-up/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-asset-clean-up/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-asset-clean-up/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-asset-clean-up/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/unloading-js/#post-14744913)
 * Status: resolved