Wednesday, 7 August 2013

Fetch iframe src and fill it in server-side with Django?

Fetch iframe src and fill it in server-side with Django?

Is there any way to fill in the HTML content of an server-side using
Django templates? I'm trying to cut down on HTTP round-trips for fetching
things like embedded Twitter feeds, etc. Something like the "srcdoc"
attribute would be great, but that isn't widely supported yet.
Is it possible to just drop the HTML into the body of the iframe and leave
out the src attribute? The page that the "src" attribute would normally
point to would be fetched by the server (Django), in order to allow for an
asynchronous, "eventual consistency" approach to caching.
The reason I'm stuck on iframes is because (iirc) I have to use them as
containers for the Twitter/GCal embedded apps, but maybe I could just use
a div with the same attributes it would also work?

No comments:

Post a Comment