From 6a50329a9c8204803ba3a85b0acb41836a5e355e Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Wed, 11 Oct 2017 10:20:55 -0700 Subject: Only preload JS in /web pages (#5325) --- app/views/home/index.html.haml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/views/home/index.html.haml') diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 6c93281db..659295ebf 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -1,4 +1,10 @@ - content_for :header_tags do + %link{ href: asset_pack_path('features/getting_started.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ + %link{ href: asset_pack_path('features/compose.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ + %link{ href: asset_pack_path('features/home_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ + %link{ href: asset_pack_path('features/notifications.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ + %link{ href: asset_pack_path('features/community_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ + %link{ href: asset_pack_path('features/public_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ %meta{name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key} %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json) -- cgit