2

I am using a browser field to display a web page, however it takes about four times as long to load a page, as compared to the default browser on BlackBerry. I want to speed up this load time.

I found that using a cache can decrease the load time. I use the code from the BlackBerry support forum knowledgebase article "How to Implement a Web Cache for Your BrowserField2 Application", but there is no speedup.

Is there another solution or did I make a mistake in using the cache?

Michael Donohue
  • 11,776
  • 5
  • 31
  • 44
mobileDeveloper
  • 894
  • 2
  • 14
  • 35
  • I am actively developing for Blackberry phones ( 4.6+) and I am using BrowserField extensively and have not faced this kind of an issue (Model: 9700). If you can share the code, I can look into it. – Kiran Kuppa Nov 21 '11 at 05:10
  • Based on your comment in the bottom, you seem to be simply loading from an URL. Am I correct? – Kiran Kuppa Nov 21 '11 at 05:14
  • I'm using Model:9800 OS:6. In the first time I use just the simple code browserField.requestContent(url); main_mgr.add(browserField); and then I used the code in this link http://supportforums.blackberry.com/t5/Java-Development/How-to-Implement-a-Web-Cache-for-Your-BrowserField2-Application/ta-p/817911 – mobileDeveloper Nov 21 '11 at 07:51

1 Answers1

0

You can minify your code. Minifying code basically removes all excessive characters (mostly whitespaces) to make your file size smaller, thus take less longer to download.

HTML however is usually not minified. I highly suggest to minify your Javascript and CSS only.

Javascript minifier

CSS minifier

Try to reduce the file of images etc, playing with extension and quality. You can also create an alternative CSS that only applies for mobile devices, loading lower quality images (for the images that have been applied in CSS that is) by adding a media type:

<link rel="stylesheet" media="screen" href="default.css" />
<link rel="stylesheet" media="handheld" href="mobile.css" />

Apart from that, there's little you can do. You can't magically increase the download speed of any mobile device so you should try to reduce the size as much as possible.

Tim S.
  • 13,597
  • 7
  • 46
  • 72
  • 1
    thx for your replay but I can't use this solution. I don't have files css or JS. I have urls and I displayed in the browser field so I want a solution to add it to browser field not a solution to do it for every url I want to diplay it – mobileDeveloper Nov 15 '11 at 08:40