• Resolved curiousprog

    (@curiousprog)


    I’m having an issue with http vs https schemes in URLs with pages cached
    with Cache Enabler. If I clear the cache and access a page using “http”
    first, then try to access the page with “https”, this second page does not
    render correctly: none of the javascript or css files load. This is
    because modern browsers block “mixed content” from being loaded: loading
    http files from referenced by https files and vice versa. Is there any
    fix for this in Cache Enabler?

    Seems like a problem, because the PHP code encodes the current scheme in
    the cached HTML file, and then it’s wrong for the other scheme. I glanced
    at some of the WordPress code, it does use is_ssl() and set_url_scheme()
    convenience functions to address this issue when the PHP runs, but once
    it’s cached as HTML that code no longer gets executed. I can see in the
    cached HTML files that the “http:” or “https:” scheme is hard coded in it.

    Any thoughts on how to fix this?

    You can see this on my site currently: try accessing
    http://curiousprog.com (works OK, it’s been cached under HTTP), then
    https://curiousprog.com (styling is incorrect, files are blocked).

    Would be nice if you could cache separate copies of pages under http and https.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • codyarsenault

    (@codyarsenault)

    Cache Enabler currently assumes that you are either using HTTP or HTTPS, not both. Is there a particular use-case why you have both protocols available? Typically, we recommend just using HTTPS. If you redirect all of your content to HTTPS it should resolve this issue.

    This was discussed in another thread here: https://ww.wp.xz.cn/support/topic/enabling-cache-enabler-causes-mixed-content-over-https/page/2/

    Thread Starter curiousprog

    (@curiousprog)

    Thanks for the quick response, Cody. Both protocols came enabled on the site from the internet host service. I’ve never had reason to consider redirecting all content the HTTPS until now. Will try that and see how it works.

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

The topic ‘Mixed content, http/https, doesn’t work’ is closed to new replies.