DEV Community

Cover image for Mixed Content: Fetching data from HTTPS and HTTP

Mixed Content: Fetching data from HTTPS and HTTP

Yashu Mittal on December 08, 2018

When a user is visiting a page, which is served over a secure connection (HTTPS), their connection with the web server is encrypted with TLS and is...
Collapse
 
ben profile image
Ben Halpern

Great post. I feel like this is one of those topics that creeped up into great relevancy as the web went https en masse and most people kind of just get hit with these notices without much prep. Many people probably deal with this for the first time in production because of some content-specific edge case or difference between dev and prod.

Collapse
 
mittalyashu profile image
Yashu Mittal

Using HTTPS for everything makes it hard for the attackers to hack into, since people starting watching movies like: Mission Impossible.

Mission impossible - falling from Burj Khalifa

From that moment, it feels like anything is possible, even breaking through a HTTPS secure connection 😂

Collapse
 
mittalyashu profile image
Yashu Mittal

Glad you like the post.

That's true, it's kinda hard to keep track of minor things and mixed content is one of them.

Collapse
 
lschultebraucks profile image
Lasse Schultebraucks

Had the same issue today at my Jekyll homepage/blog. I changed the theme and with it the css, but the page was fetching the css over http instead of https so the css was not loaded. Fixed it after declaring that is should be loading over https.

Collapse
 
mittalyashu profile image
Yashu Mittal • Edited

Interesting 🙄, was that CSS file created by you or the jekyll theme caused the error.

Collapse
 
lschultebraucks profile image
Lasse Schultebraucks

It was autogenerated in the build process. I didn't specified the url exactly, just the url.
See here. Had to declare it with // instead of https and then it was loading it correctly.

Thread Thread
 
mittalyashu profile image
Yashu Mittal

I see 😮.

As far I know that url is kinda optional to use in jekyll config.yml.

Collapse
 
rupeshiya profile image
Rupesh Krishna Jha

Great blog!
I have deployed my client side to Azure but the server side is hosted on apache server (HTTP) and I am getting the same error in production mode and waring in development mode.
But I am not getting any way to fix this.
So can you please tell me how can I fix this?
Help needed.

Collapse
 
ryan profile image
Ryan

Part of this article was copied directly from this source
developers.google.com/web/fundamen...

You should credit the author -- it is available under a CC license, as noted in the site's footer.

Collapse
 
mittalyashu profile image
Yashu Mittal

I have mentioned at the bottom of the article, under sources section.

Collapse
 
jayachandra1209 profile image
jayachandra1209

how to resolve this type of mixed content issues in nginx configuration file

Collapse
 
pierre profile image
Pierre-Henry Soria ✨

Brilliant Post, well explained! 🙂 Thanks for sharing!

Collapse
 
mittalyashu profile image
Yashu Mittal

Glad you found it helpful.