JSIO URLs

The clever bit about JSIO is the placeholder URLs – i.e. the “jsio.gif#…” that goes in your image src attributes and background-image CSS properties. Everything after the “#” is the filename of the image that should be displayed. It doesn’t have to be the filename at all, it could just be a single letter or number or symbol or whatever. It doesn’t matter to JSIO. To JSIO, everything after the “#” is just a key into the resources object that holds data uri encoded images. As long as the key is unique (which it will be if you use filenames, since no two files in the same directory can have the same name), JSIO is happy.

Using filenames as keys into our resources object is beneficial to humans. Much more beneficial than coordinates in a sprite, simply because (hopefully) the filenames are meaningful; they describe the image. In comparison to sprites, the JSIO resources object also makes maintaining your image data much easier as it is trivial to add or remove images without having to move other images around within the sprite (and consequently all coordinates referencing your moved image).

Another benefit of using filenames as keys into the JSIO resources object is for fallback. If JSIO detects your browser is IE7 or lower, it’ll strip out “jsio.gif#” leaving just your image key as the image src, which is hopefully a valid URL to the original image. Also, if JSIO detects you’re running IE8 and the image data is larger than 32KB it’ll do the same thing*.

* …but not yet in v1.0.0 alpha

Since the image key is after the “#” (it is the URL “fragment”), your browser won’t send multiple requests for the 1*1px jsio.gif file – it’ll just send one request, cache the response, and use it again. By the way, the jsio.gif image is just a transparent 1*1px gif (for maximum efficiency), but it could be an “spinner” image or something, which is shown temporarily whilst the JSIO resources file is downloaded.

This post is about JSIO – JSIO is a tiny library that allows you to make fewer requests to your server by packaging all your site image data in a JavaScript file in data uri format. The official site for JSIO can be found here: jsio.freestyle-developments.co.uk. You can read more about why I started this project here.

9,870 thoughts on “JSIO URLs

  1. Hi there! I know this is somewhat off-topic but I had to ask.

    Does operating a well-established website like yours take a lot of work?
    I’m completely new to running a blog however I do write in my diary on a daily basis.

    I’d like to start a blog so I will be able to share my experience and views online.
    Please let me know if you have any suggestions or tips for new aspiring bloggers.
    Thankyou!

  2. It’s not my first time to pay a quick visit this website, i am visiting this
    site dailly and take good data from here daily.

  3. Hmm it seems like your website ate my first comment (it was super long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog.
    I too am an aspiring blog blogger but I’m still new to the whole thing.

    Do you have any recommendations for rookie blog writers? I’d genuinely appreciate it.

  4. Консультация по выбору между клееным и профилированным брусом — объяснили разницу понятно без навязывания дорогого варианта. Выбрали клееный под постоянное проживание и не пожалели. готовые проекты домов из бруса

  5. Тур в Фетхие — природные достопримечательности бухта Олюдениз параглайдинг. Агентство подобрало отель в удобном месте рядом со всеми точками притяжения курорта. раннее бронирование Турция Москва

  6. KUWIN là nền tảng cá cược trực tuyến vận hành trên kiến trúc điện toán đám mây kết hợp mô hình
    bảo mật Zero-Trust, mang đến không gian giải trí
    tối ưu độ trễ cho mọi hội viên.
    Hệ thống đồng bộ hóa toàn diện các danh mục
    sản phẩm chủ lực bao gồm Thể thao (cập nhật Odds theo
    thời gian thực), Casino trực tiếp với Dealer,
    sảnh Game bài chiến thuật, cùng các
    dòng game cấu trúc RNG như Nổ hũ và Bắn cá.

    Ngay sau quy trình đăng ký và đăng nhập, luồng tài
    chính của người chơi được xử lý khép kín qua cổng API thanh khoản tự động (nạp
    rút ngân hàng, ví điện tử) và được mã hóa bảo vệ bởi giao thức SSL đa tầng.

    Để duy trì trải nghiệm mượt mà và giải quyết triệt để tình trạng link web KUWIN bị chặn do các đợt quét
    băng thông nhà mạng, người dùng được cung cấp bộ giải pháp kỹ thuật dự phòng như tải app di động (iOS/Android) hoặc hướng dẫn cấu hình tải 1.1.1.1.
    Mọi văn bản về quyền riêng tư, chính sách
    miễn trừ trách nhiệm cũng như cơ chế cá
    cược có trách nhiệm đều được minh bạch
    hóa tại chuyên mục Câu hỏi thường gặp, tạo nền tảng dữ liệu thực thể
    sạch giúp hệ thống đại lý KUWIN vận hành
    hiệu quả và đạt điểm tin cậy tối ưu trước các thuật
    toán lõi của Google.

  7. Юридическая помощь военнослужащим СВО и членам их семей. Переходите по запросу бесплатная юридическая помощь для участников СВО. Консультируем по вопросам выплат, получения льгот, оформления документов, прохождения ВВК, увольнения, статуса участника боевых действий и другим правовым вопросам. Помогаем защищать права военнослужащих, добиваться положенных компенсаций и решать спорные ситуации. Первая консультация — бесплатно. Обращайтесь за профессиональной поддержкой.

  8. Nunca duvidei do Bikini Paradise. Hoje ele soltou um trocado bom na maior tranquilidade. Nunca corra atrás de red.

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>