Title: User-Agent deactivate plugin
Last modified: September 2, 2020

---

# User-Agent deactivate plugin

 *  Resolved [lgokul](https://wordpress.org/support/users/lgokul/)
 * (@lgokul)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/user-agent-deactivate-plugin/)
 * Hello dear Jose, first congratulate you with your latest version, the plugin 
   runs wonderfully.
 * On the other hand I would like to give an idea of deactivating the plugin by 
   user agents (the user specifies which ones).
    This feature would be great for
   example to relieve search engines for example deactivating plugin to lighten 
   yandex or google bot, etc.
 * This feature does not have another deactivation plugin so its application would
   be the only one.
 * Another example, the plugin detects the user agent “spiderurl”
    And it would 
   deactivate some plugins to adapt the web to that user agent.
 * Thanks and regards! 😉

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

 *  Plugin Author [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/user-agent-deactivate-plugin/#post-13371786)
 * Hi [@lgokul](https://wordpress.org/support/users/lgokul/)
 * thank you very much! Your ideas are always useful.
 * Do you think it would be better to add this option directly in Freesoul Deactivate
   Plugins or in an add-on of Freesoul Deactivate Plugins?
 * Consider that I should add a call to the database also for users who are not 
   interested in this feature.
    The difference in terms of performance should not
   be noticeable, but it would not be 0.
 * Moreover, you should have a caching system that is able to don’t cache the page
   when visited by specific user agents. In some cases disabling plugins without
   cache will be less effective than enabling all plugins but serving the page with
   the cache.
    The best solution with specific user agents will depend on the weight
   of the plugins and the impact of the cache.
 * The best combination is always disabling unused plugins and cache active, but
   I can imagine that in some situations it will be a good idea disabling heavy 
   plugins and renounce to the cache for some user agents. In this case, this feature
   will be very useful. But I’m not sure it would be useful for many users, so in
   my opinion, it would be better an add-on.
 * With an add-on, only if you are interested and you see that in your situation
   it’s the best solution you use the User-Agent feature.
 * What do you think?
 *  Thread Starter [lgokul](https://wordpress.org/support/users/lgokul/)
 * (@lgokul)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/user-agent-deactivate-plugin/#post-13374316)
 * Hello Dear [@giuse](https://wordpress.org/support/users/giuse/) (Jose)
 * Fully correct it is better to put it in a separate plugin and depending on the
   acceptance of this new function you can add it later as part of the free soul
   plugin.
 * Regarding the cache of plugins like wp-rocket it is very important and I had 
   not thought about that.
 * But I suppose that since the page is optimized free of heavy plugins for the 
   user agent it would no longer be necessary.
    ————— Edit: Or is there an option?
   to first detect the user agent and if it is not in the list serve the cache as
   normal.
 * But if it detects that it is in the list to serve the new optimized page without
   plugins?
    -  This reply was modified 5 years, 9 months ago by [lgokul](https://wordpress.org/support/users/lgokul/).
 *  Plugin Author [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/user-agent-deactivate-plugin/#post-13396693)
 * Hi [@lgokul](https://wordpress.org/support/users/lgokul/)
 * the code to get the cached page runs before Freesoul Deactivate Plugins, and 
   if the page is served by the cache, FDP will not run. FDP runs when the cache
   is created. The cached page is built according to the FDP settings, but then,
   after it’s cached, its code doesn’t run anymore when the users visit the cached
   page.
 * For the most caching plugins, the only way is to exclude the user-agent from 
   the cache, but this means that with that user-agent the page will not be served
   by cache.
 * However, some plugins as W3 Total Cache, give you the possibility to serve different
   cache depending on the user agent. I mean instead of only excluding the cache,
   serving a different cache.
 * Maybe you can find also other caching plugins that give you this possibility,
   especially the premium versions. With W3 Total Cache I’m sure you can do it in
   the settings “User Agent Groups”.
 *  Thread Starter [lgokul](https://wordpress.org/support/users/lgokul/)
 * (@lgokul)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/user-agent-deactivate-plugin/#post-13398336)
 * totally correct dear Jose I just checked and my cache plugin excludes user agent
   cache so free soul would work great!
 *  Plugin Author [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/user-agent-deactivate-plugin/#post-13398603)
 * Hi [@lgokul](https://wordpress.org/support/users/lgokul/)
    your idea is now on
   my list. Honestly, I have no idea about when I will have time to work on this
   add-on. I will let you know. I will close this thread, but if you have other 
   ideas, don’t hesitate to comment again or open a new topic.
 *  Thread Starter [lgokul](https://wordpress.org/support/users/lgokul/)
 * (@lgokul)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/user-agent-deactivate-plugin/#post-13398656)
 * Thank you very much dear Jose, I wish you good luck. Greetings and thanks for
   your time!

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

The topic ‘User-Agent deactivate plugin’ is closed to new replies.

 * ![](https://ps.w.org/freesoul-deactivate-plugins/assets/icon-256x256.png?rev=
   2847508)
 * [Freesoul Deactivate Plugins - Disable plugins on individual WordPress pages](https://wordpress.org/plugins/freesoul-deactivate-plugins/)
 * [Support Threads](https://wordpress.org/support/plugin/freesoul-deactivate-plugins/)
 * [Active Topics](https://wordpress.org/support/plugin/freesoul-deactivate-plugins/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/freesoul-deactivate-plugins/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/freesoul-deactivate-plugins/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [lgokul](https://wordpress.org/support/users/lgokul/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/user-agent-deactivate-plugin/#post-13398656)
 * Status: resolved