I am creating a grails app and loading JSON files in my controller and am faced with a high risk Data issue.
The JSON files are loaded using requests in the index.gsp file of the views part.
I have various drop downs, date slider and charts in my web application using various javascript libraries (d3, jquery, highcharts, dc and crossfilter)
Now, the issue is every dropdown selection loads a new JSON table in the browser, which can be seen in the network part of the browser after pressing F12 So, after a set of selections (depending on json table size) as soon as net data transferred exceeds 200 Mb, the browser and the page becomes very slow, eventually leading to browser/page crash.
So, I started searching for clearing cache memory using javascript and apparently from the results, it's quite tough and not practical as it deals with the security issues of a browser.
How to programmatically empty browser cache?
So, I need a method for the browser to clear the cache every time a drop down is selected.
But, Is the JSON file data being loaded in cache memory or something else? As I also tried clearing cache manually by going to tools ..etc and still the browser crashed.
Can anyone tell me an approach to go about solving the problem?
Two questions mainly :
1. Where does the JSON file load data in the browser ( which memory)?
2. How do I keep clearing this data to reduce load on the browser?
Any help would be appreciated.
I am currently trying Gzip and other compressions.