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.

9,183 thoughts on “JavaScript Image Optimiser (JSIO)

  1. Аккуратнее с магазином недовес у них неплохой… Гашиш купить или я что то не так понял?

  2. Магазин ровный Я заказал 1000ф оплатил ЯД оператора попросил отправить посыль на следующий день без задержки т.к. сроки получения очень поджимают. На что оператор адекватно ответил что все сделают.На следующий вечер получил трек посылочка собранна и вот вот выезжает если уже не выехала Магазину как и его администрации – от души за оперативность и отношение к клиенту. Кокаин купить Тоже чуть дольше чем обычно ждал посылкуно все получил в полном объеме.Я думаю лучше маленько подождать и без суеты забрать.

  3. И вообще зачем тебе спасибо жать или репутацию добавлять?? Ты что малолетка глупая что это тебя так беспокоит?? Скорость ск кристалл купить Оставляйте свои отзывы Мы ценим каждого клиента нам важны ваши отзывы и мнения

  4. Hello my friend! I want to say that this post is awesome, great written and include approximately all significant infos. I?d like to see extra posts like this .

  5. В скайпе ответил что вопрос решаетьсябудем надеяться на лучшееа насчёт красной темы-даже думать не хочеться.Всем мир Гашиш купить Сейчас по России что то не видно вас.Только пожелать ветра в парусадекватных клиентов по меньше шкур

  6. Какие риски ты адекват ? ты скинул непонятно что не имеющее никакого смысла. Гашиш купить на сайте есть аська напиши мне в течении пяти минут отвечали.

  7. в порядке возрастания. Кокаин купить спасибо за пожелания

  8. В этой статье мы рассматриваем разрушительное влияние зависимости на жизнь человека. Обсуждаются аспекты, такие как здоровье, отношения и профессиональные достижения. Читатели узнают о необходимости обращения за помощью и о путях к восстановлению.
    Прочитать подробнее – лечения от алкоголизма

  9. Looking for bitcoin price today? View the real-time Bitcoin rate in GBP and learn how much a single BTC is valued in British Pounds today. bitcoinpricegbp.com follows the live BTC/GBP rate, everyday fluctuations, and important market figures for those who need an instant Bitcoin price reference in British Pounds. This site is useful for users tracking their Bitcoin balance in GBP, comparing today’s movements, and checking their portfolio value.

  10. Looking for private xmr swap without registration? Visit swapxmr.io – SwapXMR helps users exchange Monero through a direct crypto exchange flow without a trading terminal, order book, or complicated account setup. The service focuses on XMR exchange pairs with Bitcoin, Tether, Ethereum, and other digital assets, while supported buy and sell options are available through the exchange.

  11. В этой статье рассматриваются способы преодоления зависимости и успешные истории людей, которые справились с этой проблемой. Мы обсудим важность поддержки со стороны близких и профессионалов, а также стратегии, которые могут помочь в процессе выздоровления. Научитесь первоочередным шагам к новой жизни.
    Читать полностью – наркологическая клиника 24

  12. Формирование уютного интерьера невозможно без персонального подхода, в первую очередь это касается разработки кухонных гарнитуров. Локальное производство в Брестском регионе позволяет значительно упростить этот процесс: от точных замеров помещения до финального монтажа. Создание кухонь по индивидуальным параметрам позволяет принять во внимание размещение всех инженерных сетей и бытовых приборов. Изучить варианты планировок и найти идеи для функциональной кухни можно на веб-ресурсе https://aova.by/

  13. Looking for btc exchange for xmr? Head over to btctoxmr.net – our platform is designed to help you swap Bitcoin for Monero via a straightforward crypto-to-crypto exchange process. Simply input the amount of BTC you wish to exchange, check the estimated XMR you will receive, and place your order through the form provided below. The service supports fast Bitcoin to Monero exchange, no registration, and no KYC for standard crypto-to-crypto routes, with final terms and conditions displayed before the transaction begins.

  14. Runico — специализированный портал о рунах Старшего Футарка включающий все 24 символа древнескандинавского алфавита с подробным толкованием. Сайт детально освещает символику рун и практику их использования в гадании магии и психологии. https://runico.ru/pantheon/ собрал исчерпывающую базу знаний о рунах: значение каждого символа мифологические корни и практические техники. Информация подана структурированно и ясно — подойдёт новичкам и знатокам рунической традиции.

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>