Kyoto
2011-05-04
Shimogamo
Jinja,
Ryukyu
Kobujutsu
- Bo
kumiteZoo2006-10-07_043Slovenija
2010-11
015South.Africa.Roadtrip.2007-08_353Saaristoleiri
2009-08
34Hannan-ja-Esan-haat.20100822.131652.703Pakkas03Pitkanen_076Jodo-Milano.2008-09_035Oslo
2010-12-03Kobe,
Japan
2010-05-01Saaristoleiri-Uto-2008_177Hannan-ja-Esan-haat.20100821.180134.503Somero2002_02Slovenija
2010-11Need for
umbrella
in Kobe
2011-06-10Kuortti.2010-06-26Wakayama,
Japan
2010-04-20Nanbudo_Norge2007-12_038Oslo.Norway.2002.summer.034Japan
2010-04-04Kuortti.2010-06-26Nanbudo_Norge2007-12_211
Snapshot of a jQuery book

One day in the train with a jQuery book.

Optimising the size of your Javascript

Few simple rules:

  • Combine selected libraries and their plugins in to a one file
  • Minify that file
  • Compress the minified file with Gzip
  • Check with your web site session initialisation if the visitors browser supports Gzip
  • Offer either of the files depending of the visitors capabilities.

The server side checking of browsers support for Gzip could be done with the following PHP code:

$_SESSION['gzip'] = false;
if (isset($_SERVER['HTTP_ACCEPT_ENCODING'])) {
    if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false) {
        $_SESSION['gzip'] = true;
    }
}

Similarly you could compress CSS files too. For this you could try the YUI compressor.

Time: 18/11/2007 18:19

QR code for paazio.nanbudo.fi