top of page

Remove console.log() from Client Script

Using console.log() in client scripts is a common debugging practice but is not recommended for production environments. It can expose sensitive debugging information and may lead to compatibility issues across different browsers.


Resolution Steps:

  1. Replace each console.log() statement with jslog(), which is more secure and intended for use within the ServiceNow platform.

  2. Test the scripts to ensure they function as expected and that logging is appropriately directed to the JavaScript Debugger Window.


Before:

Do not use console.log in client scripts
Do not use console.log in client scripts

After: 

Instead, use jslog, which is more secure and intended to use with the ServiceNow platform.
Instead, use jslog, which is more secure and intended to use with the ServiceNow platform.

By removing console.log() from client scripts and replacing it with jslog(), you enhance security and ensure greater compatibility and professionalism in your ServiceNow environment.


For more detailed guidance on resolving this issue, please contact us at support@dt-advisory.ch.

bottom of page