Skip to content

Show warning banner and disable NewRelic errors for old IE - #16189

Merged
wjordan merged 2 commits into
stagingfrom
old-ie-fix
Jun 30, 2017
Merged

Show warning banner and disable NewRelic errors for old IE#16189
wjordan merged 2 commits into
stagingfrom
old-ie-fix

Conversation

@wjordan

@wjordan wjordan commented Jun 30, 2017

Copy link
Copy Markdown
Contributor

This PR fixes two issues:

  • Warning banner no longer displays on old-IE browsers (e.g., IE 7, 8)
  • NewRelic browser monitor does not correctly filter JS errors thrown by old-IE browsers

The underlying problem is that old-IE browsers throw load errors on webpack-bundled JS, so our unsupported-browser code is never executed correctly in these environments.

This PR refreshes our (unsupported) old-IE browser code so the warning-banner is properly shown and NewRelic error tracking is disabled (tested on IE 7+8).

I've moved the old-IE code into a separate view, and shifted order of operations around to the following sequence:

  • load CSS
  • load NewRelic-instrumented browser monitoring JS (this is auto-added between theme_common_head_before and theme_common_head_after; PR Manually instrument NewRelic browser monitoring bundle #16158 will explicitly add this in the future
  • load old-IE polyfills and execute old-ie javascript (respond.js needs to appear after all CSS, and the NewRelic-error filter needs to appear after NewRelic JS)
  • load jQuery (shim calls addEventListener, which needs to come after old-IE polyfills)
  • load all other JS (needs to run after old-IE so errors are ignored)

@wjordan
wjordan requested review from breville and joshlory June 30, 2017 12:46
@breville

Copy link
Copy Markdown
Member

fyi @tanyaparker

@wjordan
wjordan merged commit 09c88c0 into staging Jun 30, 2017
@wjordan
wjordan deleted the old-ie-fix branch June 30, 2017 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants