Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML jQuery Basics (2014) Creating a Mobile Drop Down Menu Perform: Part 1

Joseph Heckert
Joseph Heckert
1,967 Points

"Mixed Content" error in console...

This is more of an observation/help in case anyone runs into the same problem I did.

I got the following error in the console when I tried the preview after the very first step in the video:

"Mixed Content: The page at 'https://port-80-q6bk0l9085.treehouse-app.com/index.html' was loaded over HTTPS, but requested an insecure script 'http://code.jquery.com/jquery-1.11.0.min.js'. This request has been blocked; the content must be served over HTTPS."

A Google search suggested getting rid of "http:" in the jQuery script, which actually worked, but I have no idea why. Anyone know?

1 Answer

This is a little old, but thought I would chime in. It works because the page is https (s = Secure Socket Layer (SSL)). So, when you try to load something from HTTP, with no SSL, it creates a little red flag because the page is supposed to be secure but you are trying to load non-secured objects. Getting rid of http: creates a relative url and it load the element as HTTPS (if it is available) as the page is https://.