2 ms·
The person sending the emails creates a dynamic web page. It can use all of the latest and greatest web technologies. (AJAX, WebSockets, CSS3, SVG, etc) Then
by mnutt 15y ago
The person sending the emails creates a dynamic web page. It can use all of the latest and greatest web technologies. (AJAX, WebSockets, CSS3, SVG, etc) Then they create a Web Crop in our dashboard, and we give them an HTML embed code.
When a user opens the email, it points to an image on our servers. At that point, we load the dynamic web page, take a screenshot, crop it, and render it in your browser. But at that point instead of closing the connection, we leave it open. Every second, we repeat the process, replacing the old image with the new one.
- pfraze 15y agoCrafty! How do you get the image to overwrite? I would think that you could only append to the image data that's already been transmitted.
- mnutt 15y agoOur current method uses the content-type multipart/x-mixed-replace. (Remember http://www.wired.com/wired/archive/5.03/ff_push.html http://www.wired.com/wired/archive/5.03/ff_push.html? Good times...) When the request starts you specify a boundary string; then every time the browser sees that boundary string it knows to replace the existing image.