Minified CSS and JS

Minified CSS and JS

adey_dtadey_dt Posts: 5Questions: 2Answers: 0
edited July 2014 in Free community support

Hi, first-off: thank you so much for making DT available. It's a great project! :)

I just ran Google PageSpeed Insights (accessible via the Google Webmaster tools)...

Google suggests minifying a bunch of resources that I use on my page, including some DT files. (https://developers.google.com/speed/docs/insights/MinifyResources)

Now, I'd be happy to minify these just for my use and host them on my server, however I feel this would benefit the whole community if minifyed versions were hosted on the CDN:

  1. //cdn.datatables.net/1.10.0/js/jquery.dataTables.js could save 71.4KiB (69% reduction) after compression.

  2. //cdn.datatables.net/plug-ins/725b2a2115b/integration/bootstrap/3/dataTables.bootstrap.js could save 607B (27% reduction) after compression.

  3. Google didn’t report on dataTables.bootstrap.css, but I think that //cdn.datatables.net/plug-ins/725b2a2115b/integration/bootstrap/3/dataTables.bootstrap.css could be minified too?

Google also suggested losslessly compressing:

  1. //cdn.datatables.net/plug-ins/725b2a2115b/integration/bootstrap/images/sort_asc.png could save 865B (77% reduction).

  2. //cdn.datatables.net/plug-ins/725b2a2115b/integration/bootstrap/images/sort_both.png could save 829B (72% reduction).

  3. Not sure about sort_desc.png, Google didn’t report on this.

Apologies if these are already available - I just don't know where to find them.

Thanks again for a wonderful project :)

Answers

  • allanallan Posts: 63,133Questions: 1Answers: 10,399 Site admin
    1. Just change .js to .min.js - the min file is already on the CDN. I think the bug is that I've linked to the non-min file on the home page and CDN index page. Will be corrected shortly.
    2. and 3. I could minify the files, but for 0.6K the majority of the download time will be making the connection to the server. However, it is something Ill look into in future.

    Regarding the images - I'm rather keen on ditching them and replacing with an icon font at some point...

    Thanks for the feedback!

    Allan

This discussion has been closed.