In-browser HTTP traffic record and replay