drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From parthchandra <...@git.apache.org>
Subject [GitHub] drill pull request #663: DRILL-5054: Provide source files of jquery-ui and j...
Date Thu, 24 Nov 2016 00:17:40 GMT
Github user parthchandra commented on a diff in the pull request:

    --- Diff: exec/java-exec/src/main/resources/rest/query/result.ftl ---
    @@ -11,14 +11,13 @@
     <#include "*/generic.ftl">
     <#macro page_head>
    -  <link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
    -  <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/plug-ins/be7019ee387/integration/jqueryui/dataTables.jqueryui.css">
    +  <link rel="stylesheet" type="text/css" href="/static/css/jquery-ui.css">
    --- End diff --
    It's a good idea to have both CDN and local loading. Try CDN first and if that fails,
try the local set. Typically, the browser would have already got jquery and other common js
and css files cached and pages will therefore load faster. 
    See here: http://stackoverflow.com/questions/3832446/benefits-vs-pitfalls-of-hosting-jquery-locally
    and here: http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go
    Also, not too sure about including large js, png, and css files in the source tree. Should
we just put in code to try to load from a local location, and provide instructions to users
on how to download and set it up?
    If we do include the third party scripts, then I would also suggest coding the version
number into the name we keep locally: jquery-1.10.2.min.js instead of jquery.min.js, dataTables.colVis-1.1.0.min.js
instead of dataTables.colVis.min.js, etc.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message