Question: Is it possible to compress and decompress(or encoding/decoding) a string(or a large JSON) within an Aura component that has to be passed via URL parameters using Salesforce standard libraries (EncodingUtil class) ?
Scenario: I have an Lightning Aura comp on an object detail page that contains few weblinks. Clicking on any of these links would open a subtab (using WorkspaceAPI
) where I am setting Pagereference.State value with some values from the parent component. As our application is growing with more data elements, so does the Pagereference.State. To reduce the overall State parameters, I am trying to explore ways to decrease the length of the parameters to hold same data, but transfer in compressed approach.
Findings: In my research, we would need some JS libraries to do the heavy lifting on the decoding/encoding aspect. But, these could pose some security concerns as we would be relying on some external sources.
Any recommendations are welcome.