shawnbot / TODO

Somebody hold me accountable to this stuff.
0 stars 0 forks source link

Raster Eyes #5

Closed shawnbot closed 9 years ago

shawnbot commented 9 years ago

A deployable web service for rasterizing whole and partial web pages. It's definitely possible with PhantomJS, but I'd like to make something with a friendlier API for providing fallback graphics in IE8 and other underpowered/buggy browsers, or even users with JavaScript disabled. So you could fire up a server that does serves your static assets plus a special URL for rasterizing them, e.g.:

/raster-eyes/<path>?selector=<selector>

Then you could provide fallbacks like so:

<div id="vis"></div>
<!-- #vis is normally populated by JavaScript -->
<noscript><img src="/raster-eyes/index.html?selector=%23vis"></noscript>

Maybe there'd be a way to run a server using a JSON configuration that allows you to whitelist and/or blacklist specific domains, URLs, or selectors?

Ideally the results could be cached (and invalidated with an HTTP header?), either in the filesystem or an in-memory cache like redis or memcached.

shawnbot commented 9 years ago

It doesn't do static serving out of the box, but it's a thing.