I'm the author of Intab, a Chrome extension that lets you view a link inline as opposed to a new tab. There's not much fancy stuff going on behind the scenes, it's just an iframe that loads the URL the user clicked on.
It works great except for sites that set the X-Frame-Options header to DENY or SAMEORIGIN. Some really big sites like Google and Facebook both use it which makes for a slightly janky experience.
Is there any way to get around this? Since I'm using a Chrome extension, is there any browser level stuff I can access that might help? Looking for any ideas or help!
Chrome offers the
webRequest
API to intercept and modify HTTP requests. You can remove theX-Frame-Options
header to allow inlining pages within an iframe.In the manifest, you need to specify the
webRequest
andwebRequestBlocking
permissions, plus the URLs patterns you're intending to intercept.