Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cryptix/canvasstreamtest
Example of sending server drawn canvases to a browser
https://github.com/cryptix/canvasstreamtest
Last synced: 27 days ago
JSON representation
Example of sending server drawn canvases to a browser
- Host: GitHub
- URL: https://github.com/cryptix/canvasstreamtest
- Owner: cryptix
- License: gpl-2.0
- Created: 2013-11-22T19:04:51.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-30T15:31:41.000Z (about 11 years ago)
- Last Synced: 2024-10-18T17:37:41.277Z (3 months ago)
- Language: Go
- Size: 129 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CanvasStreamTest
================After reading [Intro to (images in) Go](http://www.pheelicks.com/2013/10/intro-to-images-in-go/) by [@pheelicks](https://twitter.com/@pheeelicks) I started thinking about a better approach to stream the canvas to the browser.
~~Using [data URIs](http://en.wikipedia.org/wiki/Data_URI_scheme), this is quite simple. I hammered together the Nodes example with my approach as a showcase.~~
I don't use base64 data URIs anymore because it adds a lot of overhead. Instead I serve the image in a 2nd handler and just update the img.src attribute with a unused parameter so the browser dosn't cache it.