Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github gist page won't load in iframe

I want to list all my gists on a single page and an iframe seemed like the quickest and easiest solution, the problem is that it won't load. My example show the same html used to make gist.github.com and google.com show in an iframe. Google will load but github won't.

Is this a limitation that Github imposes, is there a better way to list embed all my gists on a single page without adding each gist individually? I want it to show up automatically when I create a new one.

http://jsfiddle.net/guanome/VGEjB/1/

like image 237
FarFigNewton Avatar asked Oct 04 '11 14:10

FarFigNewton


2 Answers

Github has added the X-Frame-Options: deny HTTP header, which prevents the page from being embedded in a page (such as a frame).

See also: https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header

like image 57
Rob W Avatar answered Sep 28 '22 04:09

Rob W


Considering GitHub won't let you display its content with a frame, lime Rob mention in his answer (+1 btw), you could consider using the GitHub Api for Git.

That way, you build your own content.

like image 22
VonC Avatar answered Sep 28 '22 04:09

VonC