When developing Lightning Components, how do you get the component to refresh?

I’m developing a Quick Action Lightning Component that is delivered stand-alone, and I’m finding that it’s hard to force the browser to refresh the component and ensure that the latest version is being rendered before I test a change.

I can’t find any reference in the documentation on how to do this, but…

Can you force the refresh of a Lightning Component’s source code when testing it?

If so – how?

Answer

In Salesforce Setup, go to Security > Session Settings. In the Caching section, uncheck “Enable secure and persistent browser caching to improve performance”.

This is the right setting during development to make sure that the changes you make to your component take effect immediately and that you are not served a cached version of the component.

Attribution
Source : Link , Question Author : Rob Baillie , Answer Author : Christophe Coenraets

Leave a Comment