Implementing the "On Load" vs. "No Load" Script Versions

by Phil A.

UPDATE: MAY 5 2015

Please note that the content in this article focuses on a legacy version of the iPerceptions code, and as such may no longer be applicable.  To learn more about our Universal Code, please check out this section of our support forum, as well as this section for more information about implementing the Universal Code.




Within the “Invitation Code” section of the portal, you will have the option to use an “On Load” version of the iPerceptions script:



For any implementation, we recommend placing the script directly above the closing </body> tag for best performance.  However, our asynchronous scripts can provide even better performance, especially when using the "On Load" version of the script.  However, the “On Load” version of the script may not fire depending on where it is placed.


Below are recommendations which can help you determine the version of the iPerceptions script that you could consider implementing:

- The “On Load” script performs the asynchronous load after the window.onload event fires. 

- The “On Load” script must be placed directly in the HTML code of the page (so that the script executes before the window.onload event fires).

- The default script ("No Load") can be placed at any point in the page, including any other JavaScript files being included.  When the “No Load” script is encountered, it will fire an asynchronous call to iPerceptions.

- If you will be using an existing script loading manager, or are uncertain of where the script will be placed, then we suggest to use the default (“No Load”) script.  This script can be placed in the HTML code or in any separate JavaScript file.

- iPerceptions does not recommend placing the <script> inside any <iframe> tags.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk