3 ms·
If anyone's curious about why tracking pixels use a gif, here's a great explanation: https://stackoverflow.com/a/6639140 https://stackoverflow.com/a/6639140
by mkolodny 7y ago
If anyone's curious about why tracking pixels use a gif, here's a great explanation: https://stackoverflow.com/a/6639140 https://stackoverflow.com/a/6639140
- tyingq 7y agoYou can do a png instead of a gif. It would be ~68 bytes instead of ~35 bytes. A webp image would actually be 1 byte smaller than the gif. So perhaps Google will move to that if Safari ever caves and supports it.
- antsar 7y agoI was going to say: isn't "Content-type: image/webp" one byte larger than "Content-type: image/gif", making this useless? But apparently 204 No Content allows you to omit Content-type. Leaving this up in case anyone else was wondering :)
- pirsquare 7y agoIn most cases, you can simply just return 204 status code (for empty response) to shave away the bytes used to serve 1X1 pixel. The pixel is simply there to make the request.