-1

I am facing Mixed content warning when i am trying to load files from http to https.

But now i am planning to move my site from http to https.

I need to know whether files will be loaded from

https -> https
https > http 

without any issues.

Thank you.

Adas
  • 309
  • 1
  • 18
  • Change your links and remove the scheme so for example `http://example.com` or `https://example.com` becomes `//example.com` or you could go down the route of detecting it: https://stackoverflow.com/questions/1175096/how-to-find-out-if-youre-using-https-without-serverhttps – Lawrence Cherone Sep 09 '17 at 15:04
  • i have tried that, with this problem remain if i more my site to https ? – Adas Sep 09 '17 at 15:05
  • does all files loaded easily from https to http ? – Adas Sep 09 '17 at 15:05
  • 1
    no it won't it will handle both, though you should be able to check which resource is causing the issue and fix that. – Lawrence Cherone Sep 09 '17 at 15:06
  • 3
    The question is unclear. If you publish all content via https, then why should you get a mixed content issue? That will only happen for references to http urls from pages loaded via https. – arkascha Sep 09 '17 at 15:09
  • that is what i want to know, actually i created script which fetches files from https and loaded on http, which shows mixed content, but i was thinking if i move my site(script) to https, then files will be loaded easily on both https and http, right ? – Adas Sep 09 '17 at 15:11
  • is the page public facing so we can see it? – Wee Zel Sep 09 '17 at 15:13
  • why do you need to do this? Doesn't the scripts, sources, or other files still load? They should! It's also possible that your files actually point to http or https with external paths from your files if there scripts of any kind! It might be possible but I don't know for sure! Try investigating which files and what parts of files by using the JavaScript console! Also just change all files to http or https or do a redirect using .htaccess or other methods –  Sep 09 '17 at 15:14
  • all popup contents are coming from http, but when i run this on https, it shows mixed content warning. – Adas Sep 09 '17 at 15:14
  • to clarify, is the **https** page public facing so we can see the **error**? – Wee Zel Sep 09 '17 at 15:45

2 Answers2

0

Short version: YES, you will still face mixed content if the below cases are not treated, even after migration to https.

If you're migrating your website from http to https these are the two cases you need to consider that would still result in mixed content warning :

  • Your website is on https but you still have absolute paths starting with http:// in the source code ; you need to change them in the code
    • Your website contains URLs to external resources ( again absolute urls ) and they start with http:// ; in this case you need to check if the 3rd party serves content on https then change the URL accordingly; if not, you could just remove the http:// urls to get rid of the warning ( or make a copy of the resources locally and serve them on https )
-1

Just add the 2 script versions one with http in from and one with https just make sure the https files support https or it won't work still! Or if there on your system just add /file path and if not you can try to have files be //external file path don't add https or http in them!

  • You can also use .htaccess and redirect http to https! –  Sep 09 '17 at 15:02
  • i have tried with files // without http or https, but right now i am in mood to move site to https, i just need to know whether files be loaded from https to http without any problem or it will again show mixed content warning like if we use https to http ? – Adas Sep 09 '17 at 15:03
  • I'm afraid that may be impossible! However why do you need to do this? Doesn't the scripts, sources, or other files still load? They should! It's also possible that your files actually point to http or https with external paths from your files if there scripts of any kind! It might be possible but I don't know for sure! Try investigating which files and what parts of files by using the JavaScript console! –  Sep 09 '17 at 15:07