I am currently developing an iOS app that displays multiple charts in several UIWebviews using a JavaScript Library. The app sends data to the JS library, which then renders the charts based on the provided data.
The main issue I am facing is that each webview in the app is linking its own "portlet.js" file, causing memory usage to skyrocket as more webviews (charts) are added. This eventually leads to the app crashing after navigating through 4-5 pages of charts. I suspect that this is due to separately linking the "portlet.js" file in each webview.
Is there a way for me to link "Portlet.js" only once in a webview and have it accessible in other webviews as well?
Thank you in advance