css minification
Vladimir Panteleev via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jan 16 09:58:50 PST 2015
On Friday, 16 January 2015 at 17:40:40 UTC, Andrei Alexandrescu
wrote:
> I just added
> https://github.com/D-Programming-Language/dlang.org/pull/770,
> which generates minified css files. This is because in the near
> future css files will become heftier (more documentation
> comments, more detailed styles etc).
>
> The disadvantage is that now one needs to be online to generate
> documentation. Thoughts?
I would advise against this. If added, it should be opt-in.
I see the following issues:
- The service in question might be occasionally down, or might be
shut down completely at some point. This makes it an additional
point of failure.
- High website load or poor Internet speeds will increase the
time needed to build the website.
- We can't know for sure that at some point the owners of
cssminifier.com won't decide to inject evil code in the output.
Even if you trust the owners, the service might get hacked with
the same outcome.
- As the request goes over HTTP, you also need to trust every
peer between your machine and the website to not perform a MITM
attack.
I think relying on a random 3rd-party service is acceptable for
an amateur or hobbyist website, which we are not. Instead, I
suggest adding an optional (opt-in) rule which invokes an offline
CSS minifier.
More information about the Digitalmars-d
mailing list