[Labs-l] [Labs-announce] [Tools] Announcing cdnjs mirror for toollabs
Yuvi Panda
yuvipanda at gmail.com
Sat Apr 25 04:02:12 UTC 2015
Hello!
The Privacy Policy on Tool Labs means you can't load external
resources for JS / CSS, which is kind of a pain – normally you would
use something like Google's CDN or cdnjs to load common JS libraries.
With toollabs you had to provide this yourself. Ireas created the
"static" project https://tools.wmflabs.org/static/ to centralise this
effort. To improve load and performance we also created the
https://tools-static.wmflabs.org server as cookieless and better
cached domain to serve static assets from.
Now there exists https://tools.wmflabs.org/cdnjs/, which is a mirror
of https://cdnjs.com. This allows you to easily include a wide variety
of CSS / JS libraries in a fast, friendly and privacy policy compliant
way :) We hope the cdnjs tool (which makes use of tools-static) will
make it easy to provide static assets by taking away the maintenance
overhead of registering new libraries and keeping up with new
releases.
This should be faster than serving it out of your tool, since it is
puppetized and run directly from local file system (rather than NFS).
Appropriate cache headers are set too. It keeps older versions around
forever as well. You can add your favorite libraries (if they aren't
there already) by following the cdjs process. [1]
Thanks to the cdnjs community for maintaining this in an open, easy to
mirror way, Ori Livneh for the original idea, and Krinkle for support.
[1] https://github.com/cdnjs/cdnjs#adding-a-new-or-updating-an-existing-library
[2] Just clone https://github.com/cdnjs/cdnjs and set up an index
generator (https://gerrit.wikimedia.org/r/#/admin/projects/labs/tools/cdnjs-index)!
--
Yuvi Panda T
http://yuvi.in/blog
_______________________________________________
Labs-announce mailing list
Labs-announce at lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/labs-announce
More information about the Labs-l
mailing list