django-modernizr icon indicating copy to clipboard operation
django-modernizr copied to clipboard

Integrate local version of modernizr.js

Open bittner opened this issue 8 years ago • 0 comments

It would be nice if the two files modernizr.js and modernizr-min.js were shipped with this package in case people preferred to distribute resources from their own server. (Resolving a not yet known host name can result in an enormous performance impact, especially noticeable on single-page apps.)

The current version of those files can be downloaded from https://modernizr.com/download

Convenience

Of course, strictly speaking this is not necessary. Any project could simply download the JavaScript file, add it to its own set of static files, and set the MODERNIZR_JS_URL option in the settings. - It would be convenient, though. Django developers could then easily include the Modernizr JavaScript in their own project templates:

{% load static %}
...
<script src="{% static 'modernizr/modernizr-min.js' %}"></script>
</body>
</html>

Side note: We do a similar thing in django-bootstrap-static.

bittner avatar Mar 05 '17 18:03 bittner