Title: Autoptimize &amp; WPML caching issue
Last modified: October 10, 2022

---

# Autoptimize & WPML caching issue

 *  Resolved [jbroeker](https://wordpress.org/support/users/jbroeker/)
 * (@jbroeker)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/autoptimize-wpml-caching-issue/)
 * Hi,
 * I am using WPML in a multi-domain setup (domain.at and domain.de). When enabling
   Autoptimize I get CORS errors for some fonts, but only on one domain, namely 
   the one, that is accessed last.
 * Example: Access to font at ‘[https://domain.de/wp-content/plugins/Ultimate_VC_Addons/assets/css/fonts/ult-silk.woff&#8217](https://domain.de/wp-content/plugins/Ultimate_VC_Addons/assets/css/fonts/ult-silk.woff&#8217);
   from origin ‘[https://domain.at&#8217](https://domain.at&#8217); has been blocked
   by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested
   resource.
    (in this case domain.de was accessed first and then domain.at)
 * It seems the caching algorithm does not distinguish access via domain.at and 
   domain.de and thus serves the wrong URLs for the fonts.
 * Any ideas except excluding the affected plugins from CSS Autoptimize?
 * Best regards,
 * Jörg

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/autoptimize-wpml-caching-issue/#post-16087371)
 * Morning Jörg;
    Can you try adding `wp-content/plugins/Ultimate_VC_Addons/` to
   the comma-separated CSS optimization exclusion list?
 * frank
 *  Thread Starter [jbroeker](https://wordpress.org/support/users/jbroeker/)
 * (@jbroeker)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/autoptimize-wpml-caching-issue/#post-16087636)
 * Hi Frank,
 * Thanx for the response!
 * That is exactly what I meant with “excluding the affected plugins from CSS Autoptimize”.
   That’s what I did and what solved the issue with the errors. However, as a result
   a major part of CSS is therefor excluded from optimization. I am looking for 
   a solution, to fix caching. Autoptimize is listed as WPML compatible, which should
   include a working caching for multi-domain setups. Or maybe there is a way to
   solve the issue in the affected CSS (relative paths)?
 * Best regards,
 * Jörg
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/autoptimize-wpml-caching-issue/#post-16087980)
 * Well it’s not really a WPML + AO issue but rather a multidomain + VC addons +
   AO one 🙂
 * What you could do/ try;
    1. disable “aggregate CSS” and enable “remove render-
   blocking CSS” (making sure either “above the fold CSS” is provided or that you
   have rules on the “critical CSS” tab 2. OR try to make the exclusion more specific(
   there likely just one CSS-file inside wp-content/plugins/Ultimate_VC_Addons/ 
   that is defining the fonts) 3. OR change webserver config to send the `Access-
   Control-Allow-Origin: *` header in the response for fonts
 * hope this helps,
    frank
 *  Thread Starter [jbroeker](https://wordpress.org/support/users/jbroeker/)
 * (@jbroeker)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/autoptimize-wpml-caching-issue/#post-16088642)
 * Hi Frank,
 * Thanx! Yes, it does help! I went for option 2. 🙂
 * What is involved in the issue is a philosophical question. 😉
    Ultimate VC AddOns
   is just one affected Plug-In. Quform is another one.
 * Though there might be other options for multidomain, WPML does offer this mode
   of operation. So, sorry to insist, I would expect it to work when “WPML compatibility”
   is stated. However, to be fair, various “WPML compatible” PlugIns do not work
   properly in a multidomain setup (e.g. Yoast). So I am used to sorrow 😉
 * Best regards,
 * Jörg
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/autoptimize-wpml-caching-issue/#post-16088821)
 * I feel your pain (well, a bit) 😄

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

The topic ‘Autoptimize & WPML caching issue’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/autoptimize-wpml-caching-issue/#post-16088821)
 * Status: resolved