Is the canvas faster than a regular image?

So, if I have an example, for example:

alt text

Will it load faster if it is written in JS, in canvas? Or is it faster to have it in PNG or JPG or GIF?

+4
source share
1 answer

It depends on your network latency and for images of non-trivial size, with bandwidth available both on your server and on the user side. High latency and low bandwidth will increase the likelihood that the canvas based solution will be faster.

The speed of drawing an image on a canvas also varies greatly between browsers. Here are some pretty outdated results:

http://ajaxian.com/archives/canvas-benchmark

Since then, Chrome has released 4 versions, the Firefox team has worked on Firefox 4, and IE9 with hardware acceleration. But that can give you an idea of ​​volatility, at least.

+4
source

All Articles