From 689da12082f5223388a96c1324f029e94188d70b Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Wed, 31 Jan 2018 13:02:47 +0200 Subject: Fix `as` attribute value for preload link `as` attribute value should be `style` for stylesheet preload link See https://w3c.github.io/preload/#as-attribute --- actionview/lib/action_view/helpers/asset_tag_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionview') diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb index 16def9837e..76b1c3fb6e 100644 --- a/actionview/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb @@ -133,7 +133,7 @@ module ActionView sources_tags = sources.uniq.map { |source| href = path_to_stylesheet(source, path_options) - early_hints_links << "<#{href}>; rel=preload; as=stylesheet" + early_hints_links << "<#{href}>; rel=preload; as=style" tag_options = { "rel" => "stylesheet", "media" => "screen", -- cgit v1.2.3