The title is not exact... it should be nagging lighty to let the
browser cache my Javascripts. For one reason or another, my Javascript
and css files were not getting cached by the browser. I asked around
and was told to that in production mode the query parameters shouldn't
show up after the javascript includes, like so:
This
turned out to be false, the query parameter will be there even if you
are in production mode - I know this definitively from reading the
source. My friend turned me on to the asset packager, which I tried
next. The asset packager was very helpful, it solved the Yslow
complaint that I have too many includes to external files. Asset
package can combine all your javascript files into one, and all your
css files into one, so that your browser only has minimal external
files to fetch and loads the page much faster. It also minfied my
javascript using Doug Crockford's jsmin tool, which required me to go
through and add end-of-line semicolons in all my code, ack! Anyway,
asset package solved one of my problems, but not the one I was
originally after - the files were still not getting cached!
Again
thanks to Yslow(thank you Scott Hanselman for recommending this tool)
told me the Expired header was not being set(I had already known this
but thought it could be solved with other more round about ways). I did
a search on "expired header lighttpd" and I had the answer to my problem.
It turns out I had my mod_expire(lighty specific) configured wrong
because I have /wiki/ prepended to all paths in the wiki app, so in the
expired.url declarations: /javascripts/ didn't match my javascript
directory. I changed to /wiki/javascripts/ and it all worked. I set the
expired to one year later to match Yslow's recommendations. The wiki is
so much faster than before, yipee!