WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] HTTPS / HTTP Minify Protocol Specific URL (4 posts)

  1. michael_fcc
    Member
    Posted 1 year ago #

    I have setup WordPress to use protocol relative paths for css and js:

    ex: /wp-content/themes/responsive/style.css

    instead of: http://www.mydomain.com/wp-content/themes/responsive/style.css

    It works when minify is disabled, however when I enable it, the full path is still present

    ex:
    http://www.mydomain.com/wp-content/w3tc/min/b8ed3/default.include.18e191.css?e83a2c

    I need the minify to use protocol relative url like all other elements in my wordpress because I have some pages that are HTTPS or switch to HTTPS with ajax and the css and js will not load because the minify forces the absolute url.

    I would appreciate any help!

    Thank you!

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. michael_fcc
    Member
    Posted 1 year ago #

    Ok so I found a solution:

    in /wp-content/plugins/w3-total-cache/inc/define.php edit around line 467

    return $url;

    to

    return "";

    This will ensure all css + js resources load as a protocol relative path (without the domain) so you can use mixed modes of http and https

  3. Frederick Townes
    Member
    Plugin Author

    Posted 1 year ago #

    The minify urls are changed on detection of SSL. Will look at adding protocall relative URLs to minify.

  4. michael_fcc
    Member
    Posted 1 year ago #

    Thank you Fredrick!

    I look forward to this feature being implemented!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic