Add defer instead of async

This commit is contained in:
yafeilee 2016-08-07 12:03:58 +08:00
parent 712275037f
commit 22ca31bbb5
2 changed files with 4 additions and 2 deletions

View File

@ -8,4 +8,6 @@
//= require cable
//= require_tree .
$(document).foundation();
$(document).on('turbolinks:load', function(){
$(document).foundation();
});

View File

@ -8,7 +8,7 @@ html
= content_for?(:title) ? yield(:title) + " | #{ENV['SITE_NAME']}" : ENV['SITE_NAME']
= stylesheet_link_tag "application", 'data-turbolinks-track' => "reload"
= favicon_link_tag 'favicon.png', type: 'image/png'
= javascript_include_tag "application", 'data-turbolinks-track' => "reload", 'async' => Rails.env.production?
= javascript_include_tag "application", 'data-turbolinks-track' => "reload", 'defer' => true
= csrf_meta_tags
= action_cable_meta_tag
body data-whatinput="mouse"