[Twitch Project] Issue with linking to Twitch stream pages

[Twitch Project] Issue with linking to Twitch stream pages
0

#1

Hello All! First, I just want to say I’m very new to front end development, so I’m unsure if I’m missing something obvious here:

I have been working on the Free Code Camp Twitch API project, and I’m seeing a weird issue when linking to the actual twitch stream. I have no problem pulling information from the Twitch API, and I’m using JQuery to Append new HTML blocks for each new twitch streamer. My problem is when I actually click on the Icon to go to the twitch stream, it brings up a blank Twitch.tv page that loads indefinitely. The URL in this page looks correct (https://www.twitch.tv/esl_sc2)

However, if I copy the EXACT URL from the indefinitely-loading page, and then paste it in a new window, it works with no problem! (loads immiedately). I’ve tried doing this with both window.open() as well as . Has anyone seen this issue before? Why does it load okay in one instance, but not in the other (even though the URLs are the same)?

You can see my CodePen here:

Thanks in advance for the help!


#2

When you jump into this kind of unusual problems check the console (usually ctrl + shift + I ) , often you can find some sort of log down there ^^
In this case I see

SecurityError: The operation is insecure.

It is probably due to the fact you’re linking the user to that page from a codepen Pen, which I think is not supposed to be treated as an ‘ordinary’ website, app etc.