Almost finished my tribute page but struggling with the links

Almost finished my tribute page but struggling with the links
0

#1

Hey!

Any ideas why my last two links are only working when I open them in new tabs?

All critiques are appreciated too!

Edit: I just realized how not beautiful this page is when it’s embedded here! The real thing is better haha


#2

Well, they use noframes in media to prevent resource hot linking. This will happen when you view in Iframe. The proper way to handle a direct severlet to a media server (youtube.be) instead of the main html page (youtube.com?=video#…) is to embed it using the serverlet destination. This is different than just plopping it into the Iframe because the media server (in this case, youtube.be) will provide an exclusive connection to the client’s web browser instead of cross scripting through the website (which is intentionally restricted for security reasons).

My recommendation is to embed your media instead of providing links if you don’t want them going to a generic youtube page.


#3

Thanks so much for your suggestion! It makes a lot of sense why it’d be tough with a YouTube link.

My last link is to my FreeCodeCamp page and that one’s not working either. I’m wondering if something in my CSS is overriding it?


#4

Codepen does not allow you to go to a direct link in the preview window. To get around this, you can add target="_blank" to each of your anchor tags and the links will open in a new window automatically.


#5

the last link doesn’t work because of the website’s hot link protection. There is a way around it, but I recommend asking the owners of the source page before doing it. You use PHP to get the contents of the web page like so:

<php>
$a=file_get_contents("http://.......");
echo $a;
?>

But you don’t needs this unless its in an iframe, any typically its just a plain a-tag link to your page so the whole page navigates to the link’s site.
Now everyone knows here the achillie’s heal of hot-link protection.


#6

Thanks! This is the solution I ended up going with. It works great now