Cross-Domain Caching

James Pearson james at ifixit.com
Tue Jun 10 02:08:03 CEST 2014


Excerpts from Diego Rabatone's message of 2014-06-09 16:24:30 -0700:
> I have a blog that embed some dataviz webservices, and I want to cache this
> content that I insert using Iframes.
> The blog is: http://blog.estadaodados.com there is any way of doing this?

In general, caching is done by the content provider.  So, if you administer the
webservices you're embedding, you should cache them appropriately there.

If you don't own the content you're embedding, you should first consider
whether you're allowed to embed it. :)  After that, you have two basic options:
convince the site administrator to implement appropriate caching, or do it
yourself in a mirror.

The way a caching mirror might work is that, rather than using an iframe, your
backend code fetches the service via curl, caches it locally (on disk, in
memcache, etc.), then inserts the fetched data directly into the html you serve
your visitors.  This gives you control over the content, but be aware that it
may be against the content owner's terms of service.
 - P
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140609/d78d1341/attachment.pgp>


More information about the varnish-misc mailing list