• Resolved francoc30

    (@francoc30)


    Hi, Our site uses WP-Optimize which is compatible with FDP. I use their minify features on css and js. Do I still get the speed improvement with FDP? How should I manage both? Should I disable the minify feature? Please advise. Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jose

    (@giuse)

    Hi @francoc30

    If they are only minified, no problem at all. If they are also merged, I suggest you read “What about combined and minified files generated by cached plugins?” at https://freesoul-deactivate-plugins.com/how-deactivate-plugiins-on-specific-pages/faqs/

    The minify feature is always an help, and it’s really not a problem for FDP.

    Combining files, if your server provides HTTP/2 as practically all the servers do now, I suggest don’t combine files. But this is not because you would lose the benefits of FDP. Usually, if a plugin gives you the possibility to combine files, they generate different combinations depending on the page. By doing that, the combinations will be created excluding the assets of the plugins disabled by FDP. So, this would not be a problem for FDP. It’s only important that you clear the assets cache after you save the settings of FDP.
    But if you have HTTP/2, the browser will download the assets in a parallel way, and you don’t really need combining files. Practically, you will have only the cons.
    Imagine you have for example scripts a, b, c, and you combine them in bigger but fewer files like AB that will be served on the about page, AC on the contact page, ABC on the homepage.
    Well, when the user will go to the about page after visiting the homepage, their browser will not take any asset from the browser cache, because on the homepage it downloaded ABC, not AC. So, this is to say, that combining files prevents the browser to take full advantage of the browser cache. Until the servers provided only HTTP/1, it had sense, because you had fewer HTTP requests, but with HTTP/2 it hasn’t sense anymore, because the assets are downloaded in a parallel way. Having fewer HTTP requests may still give some little benefits, but if you have benefits, they surely are fewer than the cons.

    Another reason why I don’t like combining files is the risk of having issues.
    If for example, you need first script a, then script b, and at the end script c, and the combined file for some reason is BAC, or CAB, or any combination that isn’t ABC, you may have issues if a is required by the other assets.
    You may have issues both with JS and CSS. With JS for possible dependencies, and with CSS because some rules that should have the priority become a lower priority.

    For me, combining files in 2023 with practically all the servers that offer HTTP/2 is no anymore a good choice.
    But as said, this has nothing to do with FDP. You can still have the benefits of FDP if you combine files when they are different on various pages.

    Unfortunately, still today some speed meters will give you a higher score if you combine files, but this is because they don’t download the assets from the browser cache how the browser of a real user would do.
    Speed meters are not able to measure the score with the browser cache because they don’t have it. They only tell you that you should implement it if you don’t do it, but nothing else. This is another reason why this method is not dead completely. Still, some people think it’s useful because they see the scores, but it isn’t.

    You lose the benefits of FDP if you have the same file on all the pages. In the example, if you have always the file ABC on the homepage, on the about page, and on the contact page. In this case, you would still have the benefits of the browser cache, but not of FDP.
    All popular caching plugins that offer the combining feature serve different files depending on the page.

    FDP removes the entire plugin, so even if you have always the same combined file, and that file includes the assets of the disabled plugins, you will still have some benefits when the page is not served by the cache, because it removes also the database queries and the PHP code of the plugins.

    I hope it helps.

    Have a great day!

    Jose

    Thread Starter francoc30

    (@francoc30)

    Hi @giuse, Thanks for the prompt response. Your detail explanation gives me a little more understanding/implications of topic. My hosting provider is still using http/1.1 Looks like they are not changing it anytime soon. In such scenario, it would be better for me to keep the merging feature enabled. Is that the better of two evils? On a quick look at the browser dev tool, the number of min.css and min.js files is different in different pages. So I can still benefit from FDP, I suppose.

    On a slight different topic. After I made changes to deactivate different plugins on some pages/post, and for some reason need to deactivate FDP or even delete it, what is the impact and what happen to those changes I made to the page-specific plugins? What is the proper way to remove FDP and return the changed pages to the original states?

    Plugin Author Jose

    (@giuse)

    Hi @francoc30

    You are welcome!

    If you are sure that your hosting provides only HTTP/1 you will have some benefits if you combine the files. If you want to be sure you can use this online tool to check if HTTP/2 is enabled: https://geekflare.com/tools/http2-test

    If they they are different and depend on the page, you will have all the benefits of FDP. You will lose the benefits of the browser cache.
    I would say that combining the files in your situation will be better for the first visit, and worse for returning visitors.

    If you remove FDP from the page plugins, it will totally reset everything and it will not leave any traces in the database. It will delete all the options and the post meta associated with the single pages.
    So, if you want to test it without FDP, better if you simply deactivate it.

    FDP adds the mu-plugin file wp-content/mu-plugins/eos-deactivate-plugins.php when you activate it, and it removes it when you deactivate it. If after deactivating FDP for any reason that file is not deleted (for example the server has issues exactly when you deactivate FDP, or you have no writing rights), you need to delete it manually. But in that case, you will see a big notice in the backend that will warn you about that.

    You can also reset the FDP settings without deactivating them. To do that, you can go to Freesoul Deactivate Plugins => Tools icon => Reset FDP Settings.

    I hope it helps.

    Have a great day!

    Jose

    Thread Starter francoc30

    (@francoc30)

    Thanks for the info. My host is using http/1.1 for sure.

    I installed FDP yesterday and tested/deactivated plugins on a few pages, on my development site. My first impression is it does trim off a little time on loading speed. This morning I came across a lot of 500 Internal Server errors both in the front end and WP dashboard, and in both production and development sites. I contacted my hosting support. They indicated it could be due to the plugins. The only new thing I did was installing FDP. After I got your reply, I deactivated FDP. Now both sites are back to normal. Have you encounter this or from other users? What could have caused this?

    Plugin Author Jose

    (@giuse)

    Hi @francoc30

    Have you disabled any plugins or do you have the errors just installing FDP without touching anything?

    No other user has recently reported 500 errors, but every installation is different. There are millions of combinations created by thousands of plugins, and themes…

    The most probable cause of 500 error, if you selectively disable plugins, is when you have a plugin that uses a function defined in another plugin without first checking if that function exists. This is a bad practice, but there are a few plugins doing that.
    For popular plugins like WooCommerce FDP can fix this kind of issue caused by WooCommerce add-ons that are not properly coded, but it can’t do it for all the plugins. But this is a supposition. Until we discover the root cause we can’t confirm anything.

    Have you seen any notification on the top of the FDP settings pages? See this picture:

    If you go hover with your mouse and click on “Show details” if there were 500 errors you should see information about that error and the plugin that triggered the issue.

    You can also enable the debug in wp-config.php by adding the following lines before the comment /* That’s all, stop editing! Happy publishing. */:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    define( 'WP_DEBUG_LOG', true );

    After you see the 500 errors, check the information included in wp-content/debug.log.

    Maybe do you already have the logs of your server? If so, can you please share the information?

    After the debugging I suggest you remove the lines of code above from wp-config.php, in another case debug.log may become too big.

    Have a great day!

    Jose

    Thread Starter francoc30

    (@francoc30)

    Hi @giuse, This morning when I checked on my websites, the 500 server returned. So it may not be due to FDP after all. This error happens intermittently, and when I refresh the page it goes away. All through the afternoon, there is no error. It is puzzling to me. You have any insights?

    Just to complete the picture, I did disable some plugins on a few pages in the Single section for testing. But I didn’t know I have to clear the minify+merged files (assets as you called them) after saving the settings. So I have not done that. Also there was no Notification on the top right corner either.

    I did have debug mode enabled in the development site. I did have the following message:

    PHP Warning: An unexpected error occurred. Something may be wrong with www.remarpro.com or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to www.remarpro.com. Please contact your server administrator.) in /serverpath/public_html/test/dev1/wp-includes/update.php on line 209

    But I see this before, so I don’t think it is related to the 500 server error. Or is it?

    I’ll let things settle down a couple of days, then will activate FDP and do some testing again. BTW, how did you manage to put a screenshot in your reply? It is very handy when asking forum for support/answers.

    Plugin Author Jose

    (@giuse)

    Hi @francoc30

    the message that you see has nothing to do with the error 500, but if you see it again, you should ask your hosting provider to help fixing this issue.
    Probably, when your server tries to connect with www.remarpro.com to check for plugins updates, it’s not possible a secure connection This is something that should be investigated and solved by your hosting provider.

    About error 500, without having the logs you can only do suppositions. For me, your site requires high memory usage, and sometimes it exceeds the limits. When the limits are exceeded, you have the error for maximum memory limit exceeded.
    I guess your pages are usually served by the cache. Until they are served by the cache you have no problems. As soon as they aren’t served by the cache, and require a little more power, they trigger the 500 error.
    But as said, this is just a supposition.

    Yes, you have to clear the assets (JS/CSS) cache, in another case even though you disable some plugins, their assets will still be included in the merged files. You need to clear the assets cache only after you change the FDP settings.

    For adding a screenshot you need to press the + button, select “image”, and add the URL of the image. It will not allow you to upload a picture, only to link it, but then that image will be displayed on your comment.

    I hope it helps

    Have a great day!

    Jose

    Thread Starter francoc30

    (@francoc30)

    In the case when I deactivated the plugins in the Single settings but have not cleared the css/js assets, the merged files still come across, will the scripts still run?

    I saw there is a Similar page dropdown. What is the criteria/logic used to make the similar pages list? I try to figure out the best and efficient way to tackle all the pages on mine site. I have many. What would you suggest other than buying the pro version?

    Plugin Author Jose

    (@giuse)

    Hi @francoc30

    I suggest you read “Suggested workflow” in the documentation: https://freesoul-deactivate-plugins.com/how-deactivate-plugiins-on-specific-pages/

    About the merged files, let’s do an example. You have plugins A, B, C.
    Plugin A loads script a, plugin B loads script b, plugin C loads script c.
    Then, you have the plugin for the optimization we call O, which is that one that merges a, b, and c, and serves the file abc, which includes the scripts a, b, c in one single file instead of 3 files. Your page will call abc instead of a, b, and c.
    Then you use FDP to deactivate plugin B, but the same your page will call the file abc, which will include also the script b that you don’t need.
    If you clear the assets cache, the optimization will generate the new assets cache only with the scripts a and c, because when you visit the same page plugin b doesn’t run. The optimization plugin generates the assets cache merging only the files of the plugins that remains active.
    If you don’t clear the assets cache, it will still serve abc instead of ac.
    The file abc is of course, bigger than ac, it will require more time to arrive to the browser, and it has more code that will be parsed by the browser.
    I hope it’s clearer.

    Have a great day!

    Jose

    Thread Starter francoc30

    (@francoc30)

    Hi @giuse,

    Thank you for all these in this thread. You are very helpful and patient. I appreciate it a lot. Have a nice day.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Minified files from WP-Optimize’ is closed to new replies.