When is recommended to use the Data URI

Notice: This thread is very old.
Zuben45
Member | 268
+
0
-

Good morning,
I have a question, when is recommended to use the Data URL (URI), and when not ?

I read some articles, but I'm confused still, somewhere articles recommended Data URI and somewhere not.

I will like for every explanation :)

esorimer
Member | 114
+
+1
-

Hi,
my recommendation is use Data URL for data (images), which are shown only on one or a few pages.

If an image is used rarely, its better not to force new request on the server, but let it download within the page.

If an image is used often, it better to download it separately, so the browser can cache it. It reduce the size of all pages with this image and the image is download only once.

But if the data is big, its always better not to put it into the page, because it slows down the page load time (and lowers google page rank etc.).

Zuben45
Member | 268
+
0
-

OK, Thank you very much for answer, it good opinion :)