On October 19th, 2017, we performed an upgrade to the Bootstrap.js file. The Bootstrap was streamlined by removing a shim that supported backwards compatibility for legacy browsers including IE8, IE7, and IE6. This upgrade will allow us to continue to improve and provide the best tag management system to our customers.
The upgraded Bootstrap uses the native
The old Bootstrap is no longer available and the current Bootstrap does not support browsers that do not support the
window.JSON object. It is important to note that the impact is to legacy browsers which will no longer capture data.
Frequently Asked Questions
Some questions with corresponding answers are listed below in no order.
- What changes are going live in this upgrade? We are removing the JSON shim that supports backwards compatibility for the
JSON.parse()function. We are not adding new functionality; we are pulling the shim to slim down and modernize the Bootstrap.js file.
- Can I test this change before it goes live? Yes, you will be able to test in the
nexus-testenvironment before publishing.
- Will this upgrade affect my website visitors? We do not expect any impact to user experience. We do expect some data loss from legacy browsers that do not support JSON.
- Can I continue to use the current Bootstrap version or host it myself? No. The Bootstrap is designed and we will continue to make sure it works seamlessly with the built-in features in Manage. Upgrades to the Bootstrap are carefully and tactfully considered with the goal of continuing to develop and provide the best tag management system to our customers.
- Is there a back-out plan if something goes wrong with this upgrade? We do not expect any issues. Should any occur we will address it immediately. As with all Bootstrap upgrades, you must re-publish your spaces for changes to reflect the upgrade.
- What is the expected Bootstrap size reduction? We expect a reduction of approximately 3k.
- Will I see an error in the browser console if I use an impacted browser with the new Bootstrap.js. Yes, we expect potential console errors as with any code that is not supported by legacy browsers. We do not expect the user experience to be impacted.
We recommend the following:
- Adjust any of your code used for testing and/or optimization that depends on the JSON shim for legacy browsers.
- If you have IE, use Developer tools --> emulation mode to test the behavior for IE8 and below.
- Can we skip the upgrade if we need to support IE8? Unfortunately, no. A publish post-release will introduce the new change to the respective Bootstrap file. However, you might be able to add backwards compatibility of the JSON object by deploying a custom tag. You can attach the JSON library, any JSON shim for IE8 and above, to Bootstrapper.data.JSON through a Bind Immediate rule in the Bootstrap (meaning synchronous) to make it backward compatible. Recommend to thoroughly QA since the question of the order of operations is still open-ended. If we gather more details on how to proceed with this or different solution, we'll be happy to share. For actual implementation assistance, contact your Customer Success Manager (email@example.com) to arrange for one of our Professional Services team members to assist.
Example: For a Sync Immediate Custom JS rule where we say this:
Bootstrapper.data.JSON = 300 lines of shim code;
Code is: click here for JS code.
- How can I test the Bootstrap in production before release? The easiest way to test is generate your Bootstrap using your production version. You do this by removing the shim directly from your production Bootstrap and testing using Charles by re-writing.
Instructions to generate your Bootstrap to test
Need: Charles Proxy and code editor
- Open webpage that has Bootstrap with browser
- Using your web tools, e.g. Inspect Element, find your Bootstrap
- if you have a copy, you may want to pretty-it by using something like http://jsbeautifier.org. Inspect Element provides it beautified.
- Copy your Bootstrap and paste it to your code editor
- [Compile] Take your copy and run it though a JS Compiler. I am using http://closure-compiler.appspot.com/home. Five Errors, shown in screen capture, are expected. This is what we should expect after we remove the shim.
- [Removing the shim] Find line of code that contains word "copyright". Using this example, you will remove starting from LINE 767 ( comment line )
[Removing the shim] From that point, find the first line of code that contains word "JSON.parse". Using this example, you will remove through LINE 883 PLUS
}(),from LINE 884. This will be a total of 116 lines plus nib of the 117th line.
- [Removing the shim] Almost done. Now to look for an extra closing parenthesis. Take your shim-less Bootstrap and put it through same JS compiler and locate the extra close parenthesis and remove and re-compile. You should end up with same five errors.
- [Re-write] Using Charles Proxy, re-write your Bootstrap by using your local shim-less copy of the Bootstrap. Example below, make sure you use your correct path of your local copy.