3 ms·
base64 encoding binary files is just wrong when you could as well "push" the files' URLs over a websocket connection. that way you can take advantage of gzip co
by ammmir 15y ago
base64 encoding binary files is just wrong when you could as well "push" the files' URLs over a websocket connection. that way you can take advantage of gzip compression and caching on the client.
it also looks like the server-side code uses the blocking fs.readFileSync() call to read the entire file into memory... but maybe it could have some uses for small dynamically-generated data. if so, not sure a "file" abstraction is needed :)