consolidating css and js (000002)
XSSFilter could not parse (X)HTML:
<p>From sputnik-list-bounces@lists.luaforge.net Fri Jan 30 08:56:00 2009
Received: from pop.gmail.com (ag-in-f109.google.com [72.14.247.109])</p>
<pre><code>by localhost (mpop-1.0.11) with POP3
for <yuri>; Fri, 30 Jan 2009 08:56:00 +0000
</code></pre>
<p>Delivered-To: sputnik.list.archiver@gmail.com
Received: by 10.142.216.3 with SMTP id o3cs39622wfg;</p>
<pre><code> Wed, 28 Jan 2009 20:07:59 -0800 (PST)
</code></pre>
<p>Received: by 10.100.5.15 with SMTP id 15mr223304ane.50.1233202078677;</p>
<pre><code> Wed, 28 Jan 2009 20:07:58 -0800 (PST)
</code></pre>
<p>Return-Path: <a href="mailto:sputnik-list-bounces@lists.luaforge.net">sputnik-list-bounces@lists.luaforge.net</a>
Received: from mail.luaforge.net (www.luaforge.net [147.65.1.201])</p>
<pre><code> by mx.google.com with ESMTP id d29si28969521and.54.2009.01.28.20.07.49;
Wed, 28 Jan 2009 20:07:58 -0800 (PST)
</code></pre>
<p>Received-SPF: pass (google.com: domain of sputnik-list-bounces@lists.luaforge.net designates 147.65.1.201 as permitted sender) client-ip=147.65.1.201;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of sputnik-list-bounces@lists.luaforge.net designates 147.65.1.201 as permitted sender) smtp.mail=sputnik-list-bounces@lists.luaforge.net; dkim=neutral (body hash did not verify) header.i=@gmail.com
Received: from localhost ([127.0.0.1] helo=localhost.localdomain)</p>
<pre><code>by mail.luaforge.net with esmtp (Exim 4.50)
id 1LSQ0w-0007V0-Jr; Thu, 29 Jan 2009 04:04:34 -0200
</code></pre>
<p>Received: from rv-out-0506.google.com ([209.85.198.228])</p>
<pre><code>by mail.luaforge.net with esmtp (Exim 4.50) id 1LSQ0u-0007Uv-90
for sputnik-list@lists.luaforge.net; Thu, 29 Jan 2009 04:04:32 -0200
</code></pre>
<p>Received: by rv-out-0506.google.com with SMTP id k40so7254514rvb.29</p>
<pre><code>for <sputnik-list@lists.luaforge.net>;
Wed, 28 Jan 2009 20:07:36 -0800 (PST)
</code></pre>
<p>DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;</p>
<pre><code>h=domainkey-signature:mime-version:sender:received:date
:x-google-sender-auth:message-id:subject:from:to:content-type
:content-transfer-encoding;
bh=wz8DajG+/cG+RiqKPVBQsnahBg0WD+az7KrRWXTDTCs=;
b=iK/5scmMpdBI4IalSmOjC2j/PSkeuNNAVkH4F9k3FvBLS1wh0sgz2+1HyWl39h1dI1
Y/mVZ4Tm+il+gRDnCIlqx8H4BdkuzJilL6LgH8wSCY9yK+/0xMzUQPBzC2vKUw28s32m
bWu7S+H/9CrXtCR5IDLrUP1kuN7fCeLw5f8bU=
</code></pre>
<p>DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;</p>
<pre><code>h=mime-version:sender:date:x-google-sender-auth:message-id:subject
:from:to:content-type:content-transfer-encoding;
b=Eqz+nCSN2efAhSNqX495+wpcmRKw5OuxcIEgyiQDqD9f/yhH9/I39ehFa7UcwSpCPc
e28uMzz4aPPubZTKhy+tLJJvuGTV48EPt807tTpCcOnvOv59pzgRbZGRcrW2eEt2Oe/M
q2Lh5MOiEJAH96rjKTAQ+zvAdav72uCL6Qipc=
</code></pre>
<p>MIME-Version: 1.0
Received: by 10.141.142.15 with SMTP id u15mr1928397rvn.16.1233202056166; Wed, </p>
<pre><code>28 Jan 2009 20:07:36 -0800 (PST)
</code></pre>
<p>Date: Wed, 28 Jan 2009 20:07:36 -0800
X-Google-Sender-Auth: e78d0ce4483b23e8
Message-ID: <a href="mailto:fa4efbc00901282007j3ac5b6ccmce8ae888965412c4@mail.gmail.com">fa4efbc00901282007j3ac5b6ccmce8ae888965412c4@mail.gmail.com</a>
From: Yuri Takhteyev <a href="mailto:yuri@sims.berkeley.edu">yuri@sims.berkeley.edu</a>
To: Sputnik <a href="mailto:sputnik-list@lists.luaforge.net">sputnik-list@lists.luaforge.net</a>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Subject: [Sputnik-list] consolidating css and js
X-BeenThere: sputnik-list@lists.luaforge.net
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "An all-purpose list for now." <sputnik-list.lists.luaforge.net>
List-Unsubscribe: <a href="http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list">http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list</a>,</p>
<pre><code><mailto:sputnik-list-request@lists.luaforge.net?subject=unsubscribe>
</code></pre>
<p>List-Archive: <a href="http://lists.luaforge.net/pipermail/sputnik-list">http://lists.luaforge.net/pipermail/sputnik-list</a>
List-Post: <a href="mailto:sputnik-list@lists.luaforge.net">sputnik-list@lists.luaforge.net</a>
List-Help: <a href="mailto:sputnik-list-request@lists.luaforge.net?subject=help">sputnik-list-request@lists.luaforge.net?subject=help</a>
List-Subscribe: <a href="http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list">http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list</a>,</p>
<pre><code><mailto:sputnik-list-request@lists.luaforge.net?subject=subscribe>
</code></pre>
<p>Sender: sputnik-list-bounces@lists.luaforge.net
Errors-To: sputnik-list-bounces@lists.luaforge.net</p>
<p>To further follow YSlow advice, I decided to consolidate all default
css and js one file each.</p>
<p>So, sputnik/css/layout, sputnik/css/colors and sputnik/css/yui<em>reset
have been merged into sputnik/styles.css. The actual source of
yui</em>reset has been moved into a module (sputnik.util.yui<em>reset), under
the assumption that you won't need to edit it. It's inserted in the
style sheet in place of $reset</em>code, so you can easily get rid of YUI.</p>
<p>Similarly, there is now a single java script files used by default:
sputnik/scripts.js. This page includes jquery, now stored in
sputnik.util.jquery and inserted in place of $jquery). It also
includes the JS that used to be in the body of the page. There are now
no JS function definitions in the body. Again, you can remove jquery
by editing sputnik/scripts. However, the current assumption is that
jquery is available on all pages and is loaded before any other JS.</p>
<p>I also took the opportunity to reformat the HTML and make it a little neater.</p>
<p>Finally, I added an option of serving 'static' elements such as CSS,
JS, and standard icons from a different server. There are now three
new paramers: ICON<em>BASE</em>URL, CSS<em>BASE</em>URL and JS<em>BASE</em>URL. If set,
those will be used instead of NICE<em>URL for common icons, css, and js.
This makes it possible to just save them as files and to let another
server serve them. (Note that you can still edit those through Sputnik
and just wget them into your static directory.) It tried this on
spu.tnik.org, letting Apache serve those files, and it seemed to give
me a noticeable reduction in loading time for the first page view -
about 30% I would say. (This requires properly configured Apache -
with mod</em>deflate and mod_expires.)</p>
<ul>
<li>yuri</li>
</ul>
<p>--
http://spu.tnik.org/</p>
<hr/>
<p>Sputnik-list mailing list
Sputnik-list@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list</p>
<p>From sputnik-list-bounces@lists.luaforge.net Fri Jan 30 08:56:00 2009
Received: from pop.gmail.com (ag-in-f109.google.com [72.14.247.109])</p>
<pre><code>by localhost (mpop-1.0.11) with POP3
for <yuri>; Fri, 30 Jan 2009 08:56:00 +0000
</code></pre>
<p>Delivered-To: sputnik.list.archiver@gmail.com
Received: by 10.142.191.1 with SMTP id o1cs9865wff;</p>
<pre><code> Wed, 28 Jan 2009 21:47:36 -0800 (PST)
</code></pre>
<p>Received: by 10.100.227.6 with SMTP id z6mr2988458ang.120.1233208055021;</p>
<pre><code> Wed, 28 Jan 2009 21:47:35 -0800 (PST)
</code></pre>
<p>Return-Path: <a href="mailto:sputnik-list-bounces@lists.luaforge.net">sputnik-list-bounces@lists.luaforge.net</a>
Received: from mail.luaforge.net (www.luaforge.net [147.65.1.201])</p>
<pre><code> by mx.google.com with ESMTP id d21si15595965and.6.2009.01.28.21.47.26;
Wed, 28 Jan 2009 21:47:35 -0800 (PST)
</code></pre>
<p>Received-SPF: pass (google.com: domain of sputnik-list-bounces@lists.luaforge.net designates 147.65.1.201 as permitted sender) client-ip=147.65.1.201;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of sputnik-list-bounces@lists.luaforge.net designates 147.65.1.201 as permitted sender) smtp.mail=sputnik-list-bounces@lists.luaforge.net; dkim=neutral (body hash did not verify) header.i=@gmail.com
Received: from localhost ([127.0.0.1] helo=localhost.localdomain)</p>
<pre><code>by mail.luaforge.net with esmtp (Exim 4.50)
id 1LSRZP-0000mh-CW; Thu, 29 Jan 2009 05:44:15 -0200
</code></pre>
<p>Received: from mail-gx0-f13.google.com ([209.85.217.13])</p>
<pre><code>by mail.luaforge.net with esmtp (Exim 4.50) id 1LSRZN-0000mb-7Y
for sputnik-list@lists.luaforge.net; Thu, 29 Jan 2009 05:44:13 -0200
</code></pre>
<p>Received: by gxk6 with SMTP id 6so6292353gxk.5</p>
<pre><code>for <sputnik-list@lists.luaforge.net>;
Wed, 28 Jan 2009 21:46:47 -0800 (PST)
</code></pre>
<p>DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;</p>
<pre><code>h=domainkey-signature:mime-version:received:in-reply-to:references
:date:message-id:subject:from:to:cc:content-type
:content-transfer-encoding;
bh=0VTNIzwDwGnjh0mOLtC5CU+EOJLw2ZofdVAZCJMmIFE=;
b=kiyif/7syWFIN9XbNouKlDKLZbYl7yOuXKjGx3mILsbBg/JbXCXSyYLxhzUGSpwdq/
EkG94lUNsY7FFylrGJMFyL7YrSQ49krWbFQC63qh0zvQhgKGxqwn92nJFnSv8a0gyoEr
VUBJqJKDdF4q3OGXVfdO9bTO7PmYy7csAdYYs=
</code></pre>
<p>DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;</p>
<pre><code>h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:cc:content-type:content-transfer-encoding;
b=Ac69u9eVns7SdwgXjs+uNnf1DAUR2IJL6GNOB/iXyl6PmscBe1oEXGHfuwqVkbpYRI
Ngn2IfDVZr/C1J++hXdwXvmabe9A2W2VLdbLXo7VVG1x+1P3mZC5ggAmV0PczCpNadle
HMmjC+ZZHWrhNzXWx+U8CTbAdRJwTLrpzMnIw=
</code></pre>
<p>MIME-Version: 1.0
Received: by 10.150.154.6 with SMTP id b6mr1313569ybe.18.1233208007514; Wed, </p>
<pre><code>28 Jan 2009 21:46:47 -0800 (PST)
</code></pre>
<p>In-Reply-To: <a href="mailto:fa4efbc00901282007j3ac5b6ccmce8ae888965412c4@mail.gmail.com">fa4efbc00901282007j3ac5b6ccmce8ae888965412c4@mail.gmail.com</a>
References: <a href="mailto:fa4efbc00901282007j3ac5b6ccmce8ae888965412c4@mail.gmail.com">fa4efbc00901282007j3ac5b6ccmce8ae888965412c4@mail.gmail.com</a>
Date: Thu, 29 Jan 2009 05:46:47 +0000
Message-ID: <a href="mailto:5fe281d40901282146l4081f819lf33086f97a3490c@mail.gmail.com">5fe281d40901282146l4081f819lf33086f97a3490c@mail.gmail.com</a>
Subject: Re: [Sputnik-list] consolidating css and js
From: Jim Whitehead II <a href="mailto:jnwhiteh@gmail.com">jnwhiteh@gmail.com</a>
To: Yuri Takhteyev <a href="mailto:yuri@sims.berkeley.edu">yuri@sims.berkeley.edu</a>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: Sputnik <a href="mailto:sputnik-list@lists.luaforge.net">sputnik-list@lists.luaforge.net</a>
X-BeenThere: sputnik-list@lists.luaforge.net
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "An all-purpose list for now." <sputnik-list.lists.luaforge.net>
List-Unsubscribe: <a href="http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list">http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list</a>,</p>
<pre><code><mailto:sputnik-list-request@lists.luaforge.net?subject=unsubscribe>
</code></pre>
<p>List-Archive: <a href="http://lists.luaforge.net/pipermail/sputnik-list">http://lists.luaforge.net/pipermail/sputnik-list</a>
List-Post: <a href="mailto:sputnik-list@lists.luaforge.net">sputnik-list@lists.luaforge.net</a>
List-Help: <a href="mailto:sputnik-list-request@lists.luaforge.net?subject=help">sputnik-list-request@lists.luaforge.net?subject=help</a>
List-Subscribe: <a href="http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list">http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list</a>,</p>
<pre><code><mailto:sputnik-list-request@lists.luaforge.net?subject=subscribe>
</code></pre>
<p>Sender: sputnik-list-bounces@lists.luaforge.net
Errors-To: sputnik-list-bounces@lists.luaforge.net</p>
<p>On Thu, Jan 29, 2009 at 4:07 AM, Yuri Takhteyev <a href="mailto:yuri@sims.berkeley.edu">yuri@sims.berkeley.edu</a> wrote:</p>
<blockquote>
<p>To further follow YSlow advice, I decided to consolidate all default
css and js one file each.</p>
<p>So, sputnik/css/layout, sputnik/css/colors and sputnik/css/yui<em>reset
have been merged into sputnik/styles.css. The actual source of
yui</em>reset has been moved into a module (sputnik.util.yui<em>reset), under
the assumption that you won't need to edit it. It's inserted in the
style sheet in place of $reset</em>code, so you can easily get rid of YUI.</p>
<p>Similarly, there is now a single java script files used by default:
sputnik/scripts.js. This page includes jquery, now stored in
sputnik.util.jquery and inserted in place of $jquery). It also
includes the JS that used to be in the body of the page. There are now
no JS function definitions in the body. Again, you can remove jquery
by editing sputnik/scripts. However, the current assumption is that
jquery is available on all pages and is loaded before any other JS.</p>
</blockquote>
<p>I have to say that I disagree with these changes to the core. This is
all well and good when you are pumping out a large number of requests
in a production site but they make development more difficult. Why
are we prematurely optimizing parts of the code that people are
expected to change? There's a reason that JQuery is packed in the way
it is before it's shipped out, because it provides speedup, however no
one is trying to edit JQuery. It is reasonable and expected that the
user will want to edit main javascript on the site, as well as the
core CSS. I would hope to see this change reverted. Anyone who wants
to make the change can easily do so themselves, can they not?</p>
<blockquote>
<p>I also took the opportunity to reformat the HTML and make it a little neater.</p>
</blockquote>
<p>No objections here whatsoever.</p>
<blockquote>
<p>Finally, I added an option of serving 'static' elements such as CSS,
JS, and standard icons from a different server. There are now three
new paramers: ICON<em>BASE</em>URL, CSS<em>BASE</em>URL and JS<em>BASE</em>URL. If set,
those will be used instead of NICE<em>URL for common icons, css, and js.
This makes it possible to just save them as files and to let another
server serve them. (Note that you can still edit those through Sputnik
and just wget them into your static directory.) It tried this on
spu.tnik.org, letting Apache serve those files, and it seemed to give
me a noticeable reduction in loading time for the first page view -
about 30% I would say. (This requires properly configured Apache -
with mod</em>deflate and mod_expires.)</p>
</blockquote>
<p>Again, no objections.</p>
<hr/>
<p>Sputnik-list mailing list
Sputnik-list@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list</p>