-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid preloading IE-conditional shims #4583
Conversation
**Why**: Rails automatically adds `preload` link headers to HTTP responses for every `javascript_include_tag` and `stylesheet_include_tag`. This causes modern browsers to download these script tags. However, we include a few script tags specifically for older browsers, using Internet Explorer conditional comments. These will never actually load in modern browsers. Some browsers (Chrome) even emit warnings to this effect: "The resource https://secure.login.gov/assets/respond.min.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally."
Voting to drop support given USWDS does not explicitly support these version of IE: https://designsystem.digital.gov/documentation/developers/
|
@@ -3,7 +3,7 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" } | |||
|
|||
ruby '~> 2.6.5' | |||
|
|||
gem 'rails', '~> 6.1.0' | |||
gem 'rails', '~> 6.1.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 😀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a request spec spec/requests
that loads a page and inspects the headers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
On further discussion in Slack, there's a reluctance to drop support for Internet Explorer 10 at this point. Since these shims are only actually relevant for IE8, we may still be justified in dropping them specifically. That being said, since there's a plan to follow-up with partners to better understand browser usage, it could be best to wait 'til that's completed. I'll plan to merge this as-is. |
Why: As of version 6.1.0, Rails automatically adds preload link headers to HTTP responses for every
javascript_include_tag
andstylesheet_include_tag
. This causes modern browsers to download these script tags. However, we include a few script tags specifically for older browsers, using Internet Explorer conditional comments. These will never actually load in modern browsers. Some browsers (Chrome) even emit warnings to this effect:"The resource https://secure.login.gov/assets/respond.min.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
as
value and it is preloaded intentionally."History:
config.action_view.preload_links_header
option rails/rails#40882)Open questions:
Remaining tasks: