Hi,
I’m not 100% sure of how the mobile template switching plugin works, but there are 2 ways of changing the theme based on the useragent.
One is by using PHP to detect the useragent and then load another theme.
I suspect this is the method it uses, because they say they are not compatible with cache plugins, thus selling a pro version with support to w3 total cache.
The second one would be to do it via javascript, thus bypassing PHP.
—
So let’s say, a user on desktop accesses your site and the server generates a piece of html that return several css and js files, depending on the theme it uses.
— default js and css for wordpress and plugins
— desktop theme js and css files
Later another user comes on Mobile and is shown another theme:
— default js and css for wordpress and plugins
— mobile theme js and css files
While this is true, FVM will recognize that on the css or js urls, the desktop theme is different from the mobile theme, thus it will generate new files.
The only exception would be, if the file paths never change, which I assume they do.
I am guessing here, that the mobile template switching plugin replaces the themes at a much later stage than what FVM uses to determine which theme is in use, https://codex.wordpress.org/Plugin_API/Action_Reference
In that case, moving your scripts to the footer could solve it, because FVM checks this twice, once in the header and another on the footer.
Still, I’ll take a look at this in the near future, but I suspect the mobile template switching plugin, using some kind of hack to switch themes, which then naturally would not be detected by FVM, which uses the wordpress api.
I’ll investigate this and if there is something I can do about it, I’ll push an update.
Thanks for reporting.