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
- Gemini 2.0 Flash: An outstanding multi-modal LLM with a sci-fi streaming mode - 11th December 2024
- ChatGPT Canvas can make API requests now, but it's complicated - 10th December 2024
- I can now run a GPT-4 class model on my laptop - 9th December 2024