buffer to browser. only do stuff when it finishes