Django (web framework): What are the Best Practice For Displaying another Website from yours?
1st December 2012
My answer to Django (web framework): What are the Best Practice For Displaying another Website from yours? on Quora
This isn’t really a Django-specific question—the answer would be the same no matter what server-side tech you use.
The problem with iframes is that some websites have frame-busting JavaScript to prevent then from being framed. It’s not possible to detect this, so it’s always possible that a site you try to iframe will break your page.
A better alternative is to show a rendered preview image of the page. This is very tricky to implement (PhantomJS is a good starting point) but there are web services that can solve this for you for a fee—like http://www.url2png.com
More recent articles
- Notes from my appearance on the Software Misadventures Podcast - 10th September 2024
- Teresa T is name of the whale in Pillar Point Harbor near Half Moon Bay - 8th September 2024
- Calling LLMs from client-side JavaScript, converting PDFs to HTML + weeknotes - 6th September 2024