12.2 C
Los Angeles
Tuesday, April 22, 2025

6 Industries That Benefit Most from Digital Signage

Digital signage has evolved from simple displays...

How to Pick the Best Law Firm for Your Needs

The importance of choosing the right law firm cannot...

Promoting the Shift to Rigid Boxes in Canadian Packaging

Rigid boxes have risen to become some...

Choosing Debug Mode and Component Caching to build Lightning Components rapidly and efficiently

SalesforceChoosing Debug Mode and Component Caching to build Lightning Components rapidly and efficiently

As you start developing Lightning Components you must take care of a few settings in Salesforce Org, depending on whether you are in production or development environment.

1. DEBUG MODE: When you quick find/search ‘debug mode‘ in Salesforce org, it shows us a list of users and in front of each user there is a Debug Mode checkbox. Debug mode allows you to pop-up detailed browser error messages and warnings which can really help to debug your code and also force you to follow best practices for developing lightning components.

We should enable debug mode in development sandbox, mainly for users who are developing the lightning components as it makes sure that we follow the best practices but it should be disabled in the production environment as you don’t want your actual users to see these complex error messages and warnings, also all the CSS and javascript that is downloaded to the client is not minified, which means it will take longer to download and longer for your lightning components to load.

2. COMPONENT CACHING: When you quick find/search ‘session settings‘ in Salesforce org, you will see a checkbox named ‘Enable secure and persistent browser caching to improve performance’. By default, this checkbox is true in all environments. This checkbox value should be opposite of what we did in DEBUG MODE. If we enable this checkbox, salesforce will cache some pages to improve performances. In the development environment, we are making frequent changes in code, so it needs to be disabled as we want the latest code every time we refresh and see that component, but in the production environment, we should enable it because the code doesn’t change in production and enabling it will improve performance for the end users.

Check out our other content

Check out other tags:

Most Popular Articles

WhatsApp