If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
j_davis_metova
Posts: 35
Registered: ‎10-06-2010
My Device: Bold 9650
My Carrier: Verizon

Deleting browser history "localstorage" files

[ Edited ]

I am developing an app that uses a BrowserField. After I use the BrowserField to navigate to a few sites, I have discovered that my browser usage is being recorded in .localstorage files in the /Blackberry/system/appdata/rim/webstorage/{app_name}/localstorage folder. I have verified the existence of these files on 6.0 and 7.0 devices and would assume they are also present on 5.0 devices. The names of these files use the names of the sites I have visited. However, I cannot figure out their purpose because their contents are not readable. I also could not find any documentation on their usage. I have disabled cookies on the BrowserField and I clear the BrowserField's history when I close the browser screen. This leads me to believe that maybe the files are some sort of web cache.

 

I need to delete these files when the user closes the browser field, but I am running into an issue: I can't delete them because the files are in use by another application. After some debugging, I believe they are "in use" by the net_rim_bb_browser_olympia_proxy app, which, once started, does not seem to ever close - even after I exit my application.

 

Does anyone:

 

a) know how these files are being used? Any guesses?

b) know of a way to force their deletion?

c) know of a way to force the olympia_proxy process to close?

d) know of a way to keep these files from being created in the first place? 

 

Thank you.

Joe Davis
Developer | Metova
http://www.metova.com
Please use plain text.
Contributor
j_davis_metova
Posts: 35
Registered: ‎10-06-2010
My Device: Bold 9650
My Carrier: Verizon

Re: Deleting browser history "localstorage" files

This could be related:

 

https://developer.blackberry.com/html5/apis/localStorage.html

 

...not sure yet though.

Joe Davis
Developer | Metova
http://www.metova.com
Please use plain text.
Contributor
j_davis_metova
Posts: 35
Registered: ‎10-06-2010
My Device: Bold 9650
My Carrier: Verizon

Re: Deleting browser history "localstorage" files

[ Edited ]

I am fairly certain now that the .localstorage files are used by the BB browser's HTML5 WebStorage implementation. 

 

The native BB Browser gives a user the option of clearing the browser cache. When this is performed, the localstorage files created by the native BB Browser are deleted. The localstorage files created by my application's BrowserField remain.

 

Is there a method/API that allows a 3rd party application to delete its browser data?

Joe Davis
Developer | Metova
http://www.metova.com
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 811
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: Deleting browser history "localstorage" files

Have you looked at localStorage.clear()?

 

https://developer.blackberry.com/html5/apis/localstorage.html#.clear

Tim Windsor
Application Development Advisor II
Please use plain text.