Code Cache Combine for CSS/Javascript

December 10th, 2008

Introduction

It’s a good practice to use many small JavaScript and CSS files instead of one large JavaScript/CSS file for better code maintainability, but bad in terms of website performance. Although you should write your JavaScript code in small files and break large CSS files into small chunks, when a browser requests those JavaScript and CSS files, it makes one HTTP request per file. Every HTTP request results in a network roundtrip from your browser to the server and the delay in reaching the server and coming back to the browser is called latency. So, if you have four JavaScripts and three CSS files loaded by a page, you are wasting time in seven network roundtrips. Within the USA, latency is average 70ms. So, you waste 7×70 = 490ms, about half a second of delay. Outside USA, average latency is around 200ms. So, that means 1400ms of waiting. The browser cannot show the page properly until CSS and JavaScripts are fully loaded. So, the more latency you have, the slower the page loads...

Fahrner Image Replacement

December 10th, 2008

Fahrner Image Replacement (abbreviated FIR) is a Web design technique that uses Cascading Style Sheets to replace text on a Web page with an image containing that text. It is intended to keep the page accessible to users of screen readers, text-only web browsers, or other browsers where support for images or style sheets is either disabled or nonexistent, while allowing the image to differ between styles. FIR is named for Todd Fahrner, one of the persons originally credited with the idea of image replacement...

Lesson: Email Templates Coding

December 1st, 2008

General Notes

An Email template is usually sent as a single-part or a multi-part. There are several MIME types associated with the various parts, the most common being text/plain, text/enriched and text/html. The only MIME type on topic for this WIKI is the HTML. This document addresses CSS that works safely in the majority of cases...

Tables vs DIVs

November 28th, 2008

Many disputes go round a choice and preference of coding. Even very skilled slicers continue to slice with tables (tags <table> … </table>) till now, but more and more masters use and propagandize coding with layers, blocks or “div” slicing ( tags <div> … </div>). It is necessary to have more experience, abilities and skills for the last one, but you only need to practice a little, and you will master it...