+1 571-297-6383 | info@sonjara.com

Minor Tweaks - Improvements for Data-bound Tabs and Page Compression

A couple of small but very useful tweaks to Fakoli that I added in this week:

UI Improvement for data-bound tabs

The DataItemTabBar was a control we added about a year ago to allow for dynamic tabs based on database queries. We use it in the admin section for displaying users tabbed by role, and application settings tabbed by component. The tab bar adds scroll buttons to provide navigation when the tabs exceed the page width. This is generally fine behavior, but the number of tabs can be arbitrarily large, and scrolling through them can be pain when there are a large number, hence the need for a tweak.

The DataItemTabBar now automatically adds a dropdown selection list containing the tab links if the width of the tabs significantly exceeds the width of the window. See the attached screenshot. This kicks in when the width of the tabs would be 200px longer than the width of the page (roughly equivalent to 3 tabs).

Data-bound Tabs w/ Dropdown Extension

This behavior turns up for free whenever you use a DataItemTabBar. No code changes are required.

Support added for gzip streaming compression

This is a tweak for the Optimize component. It provides three new options -

Compress Javascript
Compress Styles
Compress Page Content

When these are selected, Fakoli checks if the user's browser can handle gzip compressed content, and if so it compresses the output before sending it to the browser.

This can have significant performance impacts, especially on initial page load. The combined Javascript file for Griot, for instance, weighs in at about 535KB uncompressed. With compression turned on this is reduced to 133.6KB. CSS fares  even better - 47KB to 8.6KB. Finally the page content compression can really make a difference when returning large tables of data. For instance the business development report on Sonjara's Griot site is 41KB of HTML uncompressed, but compresses down to 6KB.

All this combines to make websites feel snappier and more responsive, as well as helping with the process of optimizing them for mobile and low-bandwidth environments. The cost is a small increase in server CPU usage. I'm recommending that after updating to the latest and greatest Fakoli, all our production sites should have compression turned on, at least for Javascript and CSS.

Enhancements for supporting mobile users » « Code refactoring in page.php


  • gmxgmhrc
    Posted by Custom Essay Writer at 2017-10-02 22:52:34
    professional essay writing service more helpful hints essay writing service essay writing service
  • sgdczbvm
    Posted by Direct Lender Loans at 2017-10-01 15:54:44
    pay day loans payday loans online payday loans payday loans
* indicates required field