Mixed Content. This request has been blocked; the content must be served over HTTPS

Hi All. I am very new to Glitch. I am not even sure if the question should be asked here so please excuse me if I dont know what I am doing.

I am making a game with Craftyjs the body of the index.html contains the following lines:

<script type="text/javascript" src="https://rawgithub.com/craftyjs/Crafty/release/dist/crafty-min.js"></script>
<script type="text/javascript" src="http://chancejs.com/chance.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>

I am getting the error that indicates that the last two files are being blocked because of “Mixed Content. This request has been blocked; the content must be served over HTTPS”

I tried using https:// for both the files but that does not work either. How should I proceed?

Thanks.

Alok

Hey AlokJoshi,
Welcome to glitch!

Because all apps on glitch are https by default. Generally using https only scripts should’ve fixed it. When you did use https for all of the scripts, did the error message specify which line or file it failed at?

Also if your project is public, let me know what the name of it is and I’ll take a closer look

@pketh Thanks for getting back promptly. I was able to resolve the issue by using the following:

<script type="text/javascript" src="//rawgithub.com/craftyjs/Crafty/release/dist/crafty-min.js"></script>
<script type="text/javascript" src="//chancejs.com/chance.min.js"></script>
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.1.min.js"></script>

and by switching to http for invoking my project (http://pictures.glitch.me). That seemed to fix the issue. I am not sure if the issue could have been fixed in its entirety by just invoking the project the way I do it now, without changing the src attribute for the files.

Much appreciate your getting back to me.

1 Like