Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

1. The decoded Base64 data is smaller (three quarters of the size?) than the encoded data.

2. Keeping only the encoded data would mean having to decode it every time the image gets redisplayed.

Ideally, one would remove the Base64 coded data from the document, and cache the binary data.



view as:

And when the page is loaded again, how would the browser know that the base64 encoded data in the page matches the binary data that has been cached?

Whatever the behavior is, it's probably in WebKit. I should test this out on Chrome and Safari as a first pass.

Good question. I would guess that it would just decode it again when it reloads the page. That shouldnt happen often, if people set the page's time-to-live correctly. If they don't, you have to reparse the page anyways, as any content could have changed.

When redisplaying a page without reloading, the browser should just use the parsed page.


Legal | privacy