Github gist page won't load in iframe

FarFigNewton picture FarFigNewton · Oct 4, 2011 · Viewed 7.6k times · Source

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/

Answer

Rob W picture Rob W · Oct 4, 2011

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