JavaScript Image Optimiser (JSIO)

So, I’ve embarked on a new mini project. It is kind of inspired by image sprites.

Image sprites are a great idea, but come with a whole bunch of issues that make them a bit of a pain to work with.

Firstly, most of the time you have to use markup to create an element in html to “hold” the image you wanted to display from your sprite. This is because if you actually set a sprite as the background image for a large html element you’re likely to see other images in the sprite as well. Because of this, you actually lose useful functionality that CSS gives you, like the ability to position, repeat and scale an image. Also, the markup you’ve created to hold the image exists for style purposes, which is bad.

Secondly, sprites can be a massive ball ache to maintain. If you’ve closely packed your images in a sprite for maximum efficiency and then one of your images needs to change size, you’re either going to have to move ALL images surrounding the image you have to update (and obviously then change all background-position properties for the images you’ve moved) or leave a space and put the updated image in a new position in your sprite.

How do you know which images in a sprite are used and which ones are dead? Since your images are referenced by coordinates, this sort of clean up becomes a nightmare and is actually a bit lot of a nightmare to create image sprites in the first place.

The goals of the project are to

  1. Reduce the number of http requests (and their associated header traffic) to the server and hence reduce the time it takes to load all images on a website and bandwidth footprint the site requires
  2. Create a solution that’ll alleviate some of the problems surrounding the creation and use of image sprites
  3. Do something cool

The JSIO project website has a pretty good explanation of how it works so I won’t bore you with the details here. However, as a brief overview, it packages all your image data in data uri format and you reference particular images by their filename rather than their coordinates.

The site actually uses the HTML5 file api to generate your resources file for you, which makes creating and maintaining your JSIO “sprite” really really easy.

I read *somewhere* that data uri encoded images can be up to 1/3 larger than corresponding image files, however with gzip encoding they can be only 0-3% larger (or less). My thesis is that for a site with many small images, JSIO could be more efficient and easier to maintain than having separate files or even an image sprite.

…I’m yet to prove or disprove this and I’ll be conducting some tests whose results I’ll post up here (even if they do prove JSIO to be useless).

Disclaimer: This is the first ever ALPHA release of JSIO – it works on the latest Firefox and Chrome but I haven’t even checked it in IE yet. It probably won’t work in IE yet. Also, the website needs some work for optimal display on mobile devices.

3,113 thoughts on “JavaScript Image Optimiser (JSIO)

  1. no deposit usa online casino, best deposit bonus betting sites new zealand and
    free online united kingdom casino, or paypal poker sites australia

    Feel free to surf to my web blog dice game gambling app – Genia,

  2. slots best uk, canadian gambling statistics 2021 and how much top online pokies and casinos united statesn coins, or safe online bet us casino chip (Estella) australia

  3. продавец в аське..только что с нми общался Мефедрон Марихуану Бошки Кокаин Это мы и так все знаемстараемся для вас

  4. один грамотей натупил тут а про стафа правда Мефедрон Марихуану Бошки Кокаин но чет с каждым разом доставка все дороже и дороже1-й раз все было почти супер только менагер немного напутал но потом все доотправили

  5. to rent a villa commercial in dubai al barsha Commercial Property For Sale In Dubai tiger properties head office in dubaiwarehouse for rent near me

  6. Представитель был Магазин на форуме Бивис и Бадхед на сколько я знаю он работает он у нас был представителем. https://egoncharuk.ru в розницу работаете?получил посыль.мхе отличного качестваа вот ам2233 пока думаю ко скольки мутить.все пишут по разному.

  7. Хочу еще раз поблагодарить представителей этого замечательного магазина за их достойную работу Мефедрон Марихуану Бошки Кокаин пишу по сути заказал-оплатил-получил все это было очень быстро я сам охуел вечером кинули трек а уже на следующее утро получил походу ТС на реактивном истребителе доставку организовал качество нормуль делал 1к8 штырит как положено первые 20 минут на подьем потом 20 минут идет спад короче 40 минут полет отличный да был небольшой казус часть платежа потярялось но потом после созвона со службой поддержки клиентов благополучно нашлось- дырявая банковская система вот как то так. ТСу без подхолемажа РЕСПЕКТспср только растраивает такие деньги берут и че то нифига не делают. Посыль уже 3 день лежит в г. Ё-XX. Хотя должны были привезти в близлежащий город. Но тут я узнал то что у нас нет в городе филиала ихнего. Вот и не понятно толи сами привезут толи ехать до них надо.

  8. studio flat in bur dubai Buy Property In Dubai rent apartment can accommodate 15 pax in dubaisiddiqui properties dubai

  9. и меня тоже: в любом случае трек получил товар придёт отипшусь. Думаю всё ровно чем ближе к вверху ветка тем старше и выше реппутация у магазина я так понимаю Мефедрон Марихуану Бошки Кокаин Всем доброго времени суток. Вопрос такой – Ко скольки лучше делать МН и как быстро растет толер???Берут все молча

  10. Контакты указаны у меня в подписе и в разделе Наши Контакты https://sibnailschool.ru Привет В Наличии рега мощная 1к30 и скорость мука.Пробежался по веткаммагазин

  11. помнится на бизе у Вас с этим было все хорошо. Мефедрон Марихуану Бошки Кокаин Списались с оператором. Нужно взять 50 гр. СК.К магазину никаких нареканий быстро появился на форуме и развеял этот- дешевый развод.будут денежки возьму тут что нибудь дымящиеся.

  12. construction projects in uae Property For Sale In Dubai top homes real estate dubaioff plan villa in dubai

  13. жаль что панику подняли по АМу : Я бы ещё заказал… Но прод отказывается продать заботясь о моей безопасности за что ему респект. Мефедрон Марихуану Бошки Кокаин Хороший магазинчикЗа АМ 1220 ничего сказать не могу – не пробовал…. Но после тестирования 694 и 2201 впечатления о линейке АМ у меня сильно подпортились

  14. Можно позвонить в СПСР у них там даётся полная инфа по треку по телефону. Где чё лежит. Если не написано в ленте… Завтра звякну отпишу если не появится. https://dr-aslan.ru и вот я решил зайти на ветку доверенных магазинов и почему то решил ткнуть именно на ссылку чемикл микс захожу дыбанул на ценник устроило и даже очень так же порадовало то что тут делают отправку а это значит то что если товар отправят то ты его 100 получишь главная особенность магазина в том что отправка делается от 5грамм : а это значит то что я смогу и опробывать товар и убидится в качестве товара и в надежности магазиная не знаю чего тебе делать

  15. - Ну….. минут за двадцать…. Мефедрон Марихуану Бошки Кокаин В предыдущих сообщен писал что заказ по совместке от ЧММне отказали в подтверждении джаббера в ЛС. Будьте бдительны

  16. Добрый день ЦЕНЫ НА MN СНИЖЕНЫ https://gr-braslet.ru Привет всемпраздники мы тоже отдыхали так как курьерки все равно не работают

  17. sms casino deposit australia, united statesn online casino
    legal and best online casino canada no deposit bonus, or united
    statesn roulette european difference

    Also visit my site :: how to win at baccarat
    every time [Lilly]

  18. dubai property market analysis Apartments For Sale In Dubai Investment Park emaar south off plan properties dubairecommended property for sale in dubai

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>