Skip to content
This repository has been archived by the owner on Mar 25, 2019. It is now read-only.

javascript libraries: CDN and local hosting #92

Open
espinielli opened this issue Apr 7, 2016 · 0 comments
Open

javascript libraries: CDN and local hosting #92

espinielli opened this issue Apr 7, 2016 · 0 comments
Assignees

Comments

@espinielli
Copy link
Contributor

It looks like a good/safe approach for external javascript libraries is to:

  1. use CDN
  2. have a fallback reference to our web host

A code example is:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="includes/js/libs/jquery-1.6.1.min.js"%3E%3C/script%3E'))</script>

This should be done in _head.html (and cleanup all other places where we load things).

Also check Modernizr: we have (an old-ish version of) it but I am not sure how/if it is used.

NOTE/RISK: how to safely keep aligned versions numbers of referenced and locally hosted javascript libraries...maybe we need a Rake task to check for this...or have a YAML config file...

@espinielli espinielli self-assigned this Apr 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant