WordPress: http website is loading css and js files over https in chrome

I am into a very wired problem. I have http website built in WordPress. The problem is when I check the view source of the site I see that it is adding https to all the css or js external files and due to that I am getting css and js missing files error. It is only happening in the chrome browser. so I thought first may be its cache or other cookies kind a issue so I cleared the cache and also asked my friends to check the site in their laptops using chrome. what I came to know is when they checked the page by opening the view source tab, some of seeing the http and some https. users who sees the https doesn’t see site accurately. any one have any idea what causing this issue?

Related posts

2 comments

  1. Okay I finally resolved this error myself. It is a chrome bug actually but there is a little hack provided in this below link

    https://ma.ttias.be/chrome-44-sending-https-header-by-mistake-breaking-web-applications-everywhere/

    I commented this below code which I found in woocommerce.php file

    wp-contentpluginswoocommercewoocommerce.php

    /*if ( ! isset( $_SERVER['HTTPS'] ) ) {
                if ( ! empty( $_SERVER['HTTP_HTTPS'] ) ) {
                    $_SERVER['HTTPS'] = $_SERVER['HTTP_HTTPS'];
                } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) {
                    $_SERVER['HTTPS'] = '1';
                }
            }*/
    

Comments are closed.