• Resolved Raul P.

    (@alignak)


    Hi,

    I’m the plugin author for https://www.ads-software.com/plugins/fast-velocity-minify/ and I would like to request for this plugin to add support for dynamic protocol “//” urls, which I use on my merge and minify plugin.

    I have moved away from https:// and https:// for compatibility reasons.

    For example, some sites are available both via http and https. If a visitor goes to the http version and the site happens to have full page cache, other users will get a mixed content warning over https and resources won’t load.

    Sometimes people moved the site from http to https by forcing it on the wp-config.php but kept database references to http. Sometimes they are on flexible ssl via cloudflare, sometimes plugins enqueue scripts via “//” directly rather than full protocols, sometimes they use relative urls, etc.

    Your plugin was working finle before I made the switch to dynamic protocol “//” urls a few versions back, but now it doesn’t with your CDN enabler plugin.

    Now, while I could easily add this functionality to my plugin, I would like to ask if this is something you would have any interest supporting (in my opinion, I don’t see why not) and if it can be done asap.

    Thanks for your time.

    • This topic was modified 8 years ago by Raul P..
Viewing 8 replies - 1 through 8 (of 8 total)
  • codyarsenault

    (@codyarsenault)

    That is currently on our roadmap to be implemented. However, there is no defined ETA yet as to when it will be released.

    Thread Starter Raul P.

    (@alignak)

    Thanks for the reply. If there’s no ETA at least now I know I have to implement it myself. regards

    Thread Starter Raul P.

    (@alignak)

    Hi, are there any news on this feature request?

    Hi,

    Agreed with Raul, this is a much needed feature. Most decent themes and plugins now use “//” as a best practice instead of forcing http or https so that the client decides which protocol to use, I do not see why this should prevent KeyCDN from caching the file.

    I would also really appreciate an update!

    Thanks and Regards

    All WooCommerce URLs are without protocol, so the CDN link will not be replaced. Could you please fix it?

    Examples:
    <script type=’text/javascript’ src=’//staging.xyz.de/wp-content/plugins/woocommerce/assets/js/frontend/single-product.min.js?ver=3.1.1′></script>

    <script type=’text/javascript’ src=’//staging.xyz.de/wp-content/plugins/woocommerce/assets/js/jquery-blockui/jquery.blockUI.min.js?ver=2.70′></script>

    <script type=’text/javascript’ src=’//staging.xyz.de/wp-content/plugins/woocommerce/assets/js/js-cookie/js.cookie.min.js?ver=2.1.4′></script>

    Thread Starter Raul P.

    (@alignak)

    This is by design, to avoid mixed content warnings on some sites.
    There’s an option on the plugin settings, if you need to use a cdn for the generated files. You only need the url for your cdn.

    WooCommerce 3.2 will add a filter for this issue. You can fix it then with the following code snippet:

    // Add "https://" or "https://" instead of dynamic protocol before the asset url, for "CDN Enabler" Plugin compatibility
    function mr_fix_wc_asset_url_for_cdn( $path ) {
    	return $path;
    }
    add_filter('woocommerce_get_asset_url', 'mr_fix_wc_asset_url_for_cdn');
    Thread Starter Raul P.

    (@alignak)

    Thanks, but the files generated by FVM are not specific to woocommerce.
    It merges any js and css files it finds, woocommerce or not.
    And then, it changes the generated files url.

    While I’m still evaluating a better way to do this, you can use the cdn by setting your cdn domain on the plugin settings, so there’s nothing to fix and it will work just fine.

    Are you looking at Settings > Fast Velocity Minify for the settings, and seen the cdn option?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Add support for dynamic protocol “//” urls’ is closed to new replies.