Disable Unwanted Script
-
How to disable FIFU wp json and jQuery script above closing body. I am not using any features like lightbox. PHP doing everything. So how to remove FIFU Scripts. I tried by wp_dequeue_script() with 100 priority. Other scripts removed but not working for FIFU generated script
https://i.ibb.co/CsKL0df/Screenshot-2023-01-27-17-27-54-18-40deb401b9ffe8e1df2f1cc5ba480b12.jpg
The page I need help with: [log in to see the link]
-
Hi, @rieiirir.
Please access FIFU > Status. Copy and send me the data.
Featured Image from URL (FIFU):4.2.2;
WordPress:6.1.1;
Site:https://gamenewsmania.net;
Theme:smart-mag (WooCommerce);
PHP:7.4.33;
WooCommerce:;
Pages:7;
Posts:365;
Products:;
Images without dimensions:0;
URLs with metadata:130;
URLs:107;
Users:1;
php-curl:yes;
Max lenght:2048;
Plugins:- Classic Editor (classic-editor)
- Debloat (debloat)
- Featured Image from URL (FIFU) (featured-image-from-url)
- Limit Login Attempts Reloaded (limit-login-attempts-reloaded)
- LiteSpeed Cache (litespeed-cache)
- SmartMag Core (smartmag)
- Web Stories (web-stories)
- Yoast SEO (wordpress-seo)
- Yoast SEO Premium (wordpress-seo-premium);
Active plugins: - classic-editor
- debloat
- featured-image-from-url
- litespeed-cache
- smartmag-core
- web-stories
- wordpress-seo-premium
- wordpress-seo
fifu_auto_alt:toggleon;
fifu_cdn_content:toggleoff;
fifu_cdn_crop:toggleoff;
fifu_cdn_social:toggleoff;
fifu_check:toggleoff;
fifu_content:toggleoff;
fifu_content_cpt:toggleoff;
fifu_content_page:toggleoff;
fifu_data_clean:toggleoff;
fifu_decode:toggleoff;
fifu_default_cpt:post,page,product;
fifu_default_url:;
fifu_dynamic_alt:toggleoff;
fifu_enable_default_url:toggleoff;
fifu_fake:toggleon;
fifu_get_first:toggleoff;
fifu_grid_category:;
fifu_hide_cpt:toggleoff;
fifu_hide_page:toggleoff;
fifu_hide_post:toggleoff;
fifu_html_cpt:;
fifu_lazy:toggleoff;
fifu_ovw_first:toggleoff;
fifu_photon:toggleoff;
fifu_pop_first:toggleoff;
fifu_query_strings:toggleoff;
fifu_reset:toggleoff;
fifu_run_delete_all:toggleoff;
fifu_run_delete_all_time:;
fifu_skip:;
fifu_social:toggleon;
fifu_social_image_only:toggleoff;
fifu_spinner_nth:1;
fifu_wc_lbox:toggleon;
fifu_wc_zoom:toggleon;
Image:
| https://image.gamenewsmania.net/Free-Fire-Mastering_23-01-25_10-31-35-570.jpg
|_ https://gamenewsmania.net/free-fire/top-10-tips-for-mastering-the-battlefield-in-free-fire/ | https://image.gamenewsmania.net/BGMI-unban_23-01-24_13-20-34-432.jpg |_ https://gamenewsmania.net/bgmi/bgmi-will-unban-after-1-year-like-pubg-mobile/
| https://image.gamenewsmania.net/Account-ban_23-01-22_17-39-55-497.jpg
|__ https://gamenewsmania.net/free-fire/5-mistakes-behind-your-free-fire-account-ban/;
Video:;
Slider:;
REST routes: - https://gamenewsmania.net/wp-json/:PHP;
- https://gamenewsmania.net/wp-json/:JS
Thanks, @rieiirir. What exactly is “FIFU wp json”?
Sorry, I saw the screenshot now. I got it.
You said “PHP doing everything”, but you have other 12 JavaScripts on your homepage.
You have 941.51 kB of scripts. FIFU script has 2.49 kB only. So please let me know why removing FIFU script would be relevant for your site.
all JS are important like ADS, jQuery, Sidebar, main theme js. I am trying to improve core web vital by removing unused script. I installed FIFU for only adding featured image. So there are no sense to add unused extra line of codes even less size. When I installed FIFU at least 4 months ago, then there are no any scripts, but after update the plugin, i noticed that scripts. If you are the dev. then please set an option to remove those 2 scripts – Wp-json and jQuery. If that line are important that set them for admin only and disable from Frontend.
-
This reply was modified 3 years, 4 months ago by
Hirak Kalita.
Hi, @rieiirir.
all JS are important like ADS, jQuery, Sidebar, main theme js
And I’m sure all them have unused code as well, sometimes even bigger than 2.49 KB.
So there are no sense to add unused extra line of codes even less size.
I agree, but looking at your site, with so many heavy scripts, it’s a contradiction.
When I installed FIFU at least 4 months ago, then there are no any scripts
From my memory, the JS was always there. Maybe you have installed a very old version.
If you are the dev. then please set an option to remove those 2 scripts – Wp-json and jQuery
The JSON you are talking about has ~200 characters. Your page has more than 100,000 characters. Also jQuery is a default WordPress library. It’s not directly added by FIFU.
So even though what you’re asking sounds strange (when looking for your website), in good faith we will give you a solution.
Access featured-image-from-url/includes/thumbnail.php and comment or remove the commands “wp_enqueue_script(‘fifu-image-js...” and “wp_localize_script(‘fifu-image-js“. Contact me if you don’t know how to do it.
We’ll also analyze the possibility of removing the script (image.js) and the JSON when that’s not really necessary without creating a new option for that. I’ll let you know when that’s done or if, for some reason, that’s not possible.
It’s working, thank you.
Hi, @rieiirir.
In the next version, 4.2.5, the json and the image.js file (and eventually its dependency, jQuery, if that’s not being used by another component) won’t be loaded, except if you use FIFU Lazy Load, Flatsome theme or WooCommerce plugin.
The topic ‘Disable Unwanted Script’ is closed to new replies.