• I noticed that when this option is setup (the main website being https://www.domain.com):

    define('WP_CONTENT_URL', 'https://s.domain.com' );

    All the scripts loaded like https://s.domain.com/themes/domain/assets/javascript/functions.js won’t get merged, and will keep the same with no minification. Once I unset the WP_CONTENT_URL constant, they are included with no problem.

    The s.domain.com is not external, it’s just an alias of the main website, but with a virtual host pointing to /wp-content/ for cookie-free domain purposes. Is there a fix or something I can do to use this plugin and keep the cookie-free domains?

Viewing 1 replies (of 1 total)
  • Plugin Author Raul P.

    (@alignak)

    Hi,

    Indeed, that would be considered an external url because it doesn’t match the home or site url, and we do not merge external scripts because those could be ads or whatever.

    The cookie free domain thing is useless, it’s an old optimization technique from yahoo that is not even considered anymore by google pagespeed insights.
    Furthermore, if you use cloudflare.com, you will always have cookies no matter where.

    If s.domain.com loads the same contents as domain.com, you could try to remove that option and add it to the cdn option on the plugin settings.
    That would make the css and js files load from s.domain.com although this functionality is still under development, so it might not be perfect yet.

Viewing 1 replies (of 1 total)

The topic ‘Scripts not merged when using a different WP_CONTENT_URL’ is closed to new replies.