data-uri via uri

().

When I ran the YSlow report this page was using the snippet below, but for obvious reasons I had to change this :-)

<script>
    document.write('<style>.box {background:url('+top.location.search.substring(1)+');}</style>');
</script>

It still uses document.write(), but it passes the whole data-uri. Using the query string (query component of a URI) would require some serious sanitization.

Yahoo! Search (sprite)