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 Bing Chat—Our First Encounter With Manipulative AI - 19th November 2024
- Project: Civic Band - scraping and searching PDF meeting minutes from hundreds of municipalities - 16th November 2024
- Qwen2.5-Coder-32B is an LLM that can code well that runs on my Mac - 12th November 2024