3 ms·
That way the browser can download and cache 5 possible images rather than 100 and the user just has to think in terms of 0-100.
by ejfinneran 13y ago
That way the browser can download and cache 5 possible images rather than 100 and the user just has to think in terms of 0-100.
- mistercow 13y ago>and the user just has to think in terms of 0-100 This is the part I'm not understanding. Why would the user want to think in terms of 0-100? What benefit is there to that? One way or another, you're going to be doing Math.floor(val*N/maxVal). What difference does it make if N=5 or N=100? The only advantage I can see is that setting N higher means that you can later add more steps without breaking backwards compatibility. But this is one case where that definitely won't happen, since the steps are a historical reference.