Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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://.