css minification

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 16 13:39:51 PST 2015


On 1/16/15 1:32 PM, Vladimir Panteleev wrote:
> On Friday, 16 January 2015 at 21:26:04 UTC, Andrei Alexandrescu wrote:
>> Well good point. As of January two of the css files are in the top 3
>> most trafficked files off of dlang.org, second only to favicon.ico.
>
> That's probably because HTTP caching is not configured.
>
> Ideally, you'd put the file's modification time in its path, e.g.:
>
> <link rel="stylesheet" type="text/css" href="css/1421443851/style.css" />
>
> css/*/style.css would point to the same style.css (via internal, not
> HTTP redirect).
>
> Then, css/* can be cached forever, as the URL of the file would change
> when the file changes.
>
> This is what DFeed does, but I'm not sure if this is feasible with just
> DDoc and makefiles, though.

Nice. Wanna take it up? Generally I'm looking for less work for me and 
more work for others :o). -- Andrei



More information about the Digitalmars-d mailing list