Another Noobly Question [CSS3 and HTML5]

Or you torproject it. Google are a bunch of nazis.

I know what you mean though. There are so many regulations to go through. Good luck buddy.
 
Urg, google. I'm just going to accept it as it is currently, it's still pretty good I think? Average load time is 1.57seconds.

Here is another question:

Base64 data url or src="image/logo.png" ?
 
src to a physical file.

Images can load asynchronously.

With base64, they are part of the downstream payload, so instead of linking off to a 100KB image, you are including an extra 137KB of text into your HTML download.
 
src to a physical file.

Images can load asynchronously.

With base64, they are part of the downstream payload, so instead of linking off to a 100KB image, you are including an extra 137KB of text into your HTML download.

I need noob style explanations like this:

link to the image - best way

Dont use base64 it wil make your index.html file to big

Is the above statement correct?

If so, what is the use of base64?
 
Historically, base64 was used for compatibility reasons. It was seen as a safe manner with which to transmit arbitrary data where you could generally accept that it got to the other side intact.

As for src files vs base64, although I may be wrong I'm pretty sure base64 is not cacheable as opposed to src files which are. Plus, base64 encodings of images are larger than the images themselves.

There is a use for base64 in webpages tho. Off the top of my head:

1. Thumbnails of pictures can be made with the use of the canvas element instead of having the server needing to deal with that. You can then embed that thumbnail into an input of type file with value = your base64 encoding of said thumbnail.
2. For realtime apps connecting users with say websockets, you'd generally transport base64 encoded images among peers.
 
Last edited:
Thank you so much for that explanation it's so much better than anything I found on Google.
 
Top
Sign up to the MyBroadband newsletter
X