You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/includes/_requirements.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Other methods:
33
33
34
34
* Alternate to both of the above methods, we can create a test site for you and specify the script to include on the site. This will make your integrated code available for all viewers of the test site which is useful in a setting where multiple stakeholders or developers want to see the integration in development or for testing purposes.
35
35
36
-
Your code should be minimal and perform only actions necessary to bootstrap your integration on to the site.
36
+
Your code should be minimal and perform only actions necessary to bootstrap your integration on to the site. See the Technical Requirements below for more detail on this point.
37
37
38
38
## Technical Requirements
39
39
@@ -48,16 +48,22 @@ Your code should be minimal and perform only actions necessary to bootstrap your
48
48
```
49
49
***Avoid Global Scope Pollution** - Always ecapsulate your code in an immediately executing function expression to avoid polluting the global namespace. See sidebar for example of such a function.
50
50
51
-
***Use a CDN** - Your bootstrap script and any other integration code or assets should be located on a highly available content delivery network and must work over an HTTPS connection.
51
+
***Avoid Duplicate Code** - Please refrain from including large libraries such as jQuery or React, as both are already available on all pages of all of our sites. Avoid polyfilling items that DDC already polyfills.
52
52
53
53
***Minification and Compression** - All code should be minified and served using gzip or better compression.
54
54
55
55
***Minimize Asset Size** - Integrations should avoid loading excessive imagery, fonts and scripts. While some are often necessary, less is more and avoiding loading duplicate scripts will help reduce load time for your integration as well as improve overall website speed.
56
56
57
-
***Avoid Duplicate Code** - Please refrain from including large libraries such as jQuery or React, as both are already available on all pages of all of our sites. Avoid polyfilling items that DDC already polyfills.
58
-
59
-
***Browser Support** - We strive to support Edge, Firefox, Chrome, Safari, and iOS Safari, however, you may choose your own level of support.
57
+
***Minimize Domains** - Serve content from as few domains as possible to reduce the number of https connections the browser must make.
60
58
61
59
***Minimize Files** - Serve content from as few files as possible to allow for optimal downloads.
62
60
63
-
***Minimize Domains** - Serve content from as few domains as possible to reduce the number of https connections the browser must make.
61
+
***Minimize Requests** - Requests to services necessary for your integration to function should be as minimal as possible. For example, on a search results page with 30 vehicles, you should make a single batch request to gather data for those vehicles rather than 30 individual requests.
62
+
63
+
***Delay Load Content** - A good way to optimize your integration is to do less work on initial page load, and to only do the remaining work on demand. For example, if your integration inserts a Call To Action button, banner or other "point of entry" and when clicked that opens your tool in an overlay, consider waiting to load the code for that overlay until the user clicks the button. You can leverage the API to insert the button with a very small amount of code. When clicked, a function can be called to load the remaining code for your overlay and then fire the initialization routine. This may not be a viable solution for all integrations, but this pattern should be followed whenever possible.
64
+
65
+
***Cache Service Responses** - You should consider leveraging <ahref="https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage"target="_blank">local storage</a> or <ahref="https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage"target="_blank">session storage</a> to cache data from calls to services required by your integration. Similar to the line item above, if you have a service that returns data, caching that data in the user's browser will avoid having to request it multiple times. This is helpful when users search for vehicles on a site and may see the same vehicle multiple times in different contexts. Reduced calls to your service will reduce network traffic, stress on your service, and will improve the user experience.
66
+
67
+
***Use a CDN** - Your bootstrap script and any other integration code or assets should be located on a highly available content delivery network and must work over an HTTPS connection.
68
+
69
+
***Browser Support** - We strive to support Edge, Firefox, Chrome, Safari, and iOS Safari, however, you may choose your own level of support. We do not allow access to our web sites on Legacy Edge, Internet Explorer 11 or lower IE versions.
0 commit comments