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

Web and WebWorks Development

Reply
New Developer
MarcusMalinow
Posts: 7
Registered: ‎03-30-2009
My Device: Not Specified

Browser-Channel push issue

Hi all,

I hope someone can help me with an issue I'm having with a Browser-Channel push, or if not help then has anyone run into the same issue?

The firm I work for want to send out an emergency contact list via a Browser-Channel push. I have written a couple of VB scripts to do this. Basically this works 95% of the time, although I provide a URL, the local content is displayed. The problem is that sometimes the URL is displayed instead and the local cached content is ignored. Given that it's an emergency contact list, when it's actually needed we won't be able to count on the URL being resolved as it's quite possible that our web servers would be down. So, is there way of forcing the BB to always display the local content?

We are using 8220's, 8310's, 8900's and 9000's.

Thanks in advance

Marcus
Please use plain text.
Developer
abarber
Posts: 189
Registered: ‎08-13-2008
My Device: Not Specified

Re: Browser-Channel push issue

If there is a cached version of the page on the device then it will always be displayed.

 

How long are you setting the page to be cached for?

 

How often do you push to the device?

 

Are you using parameters on the end of the urls?

 

 

Andrew

 

 

 

Please use plain text.
New Developer
MarcusMalinow
Posts: 7
Registered: ‎03-30-2009
My Device: Not Specified

Re: Browser-Channel push issue

I'm setting the expiry date using the meta expires tag in the html to be one month from the date of the push.

 

I'm pushing the file out every day.

 

The url I'm providing is just the homepage of the firm I work for. Given that the user has a cached page I never intend for this to be displayed, unfortunately the cached page doesn't always work as expected.

Please use plain text.
Developer
abarber
Posts: 189
Registered: ‎08-13-2008
My Device: Not Specified

Re: Browser-Channel push issue

Are you sure the page is being cached correctly.

 

Have you tested the cached page with no wireless coverage set on the BB device?

 

Try setting the cached length using the Expires header -

 

Expiry of cache content
An application that pushes data to the browser cache can include an expiry time that defines the length of time that the data remains in the cache before it is removed.
The default length of time that push content is stored in cache memory varies with the BlackBerry Browser software version used. In BlackBerry Browser version 3.8 and later, pushed content is removed from the cache after 12 hours. In preceding versions, pushed content expired and was removed from the cache after 29 days.
To increase or decrease the length of time that the cache memory stores the content, specify a date and time in the Expires header in the push request’s HTTP header. The following example stores content in cache until September 10, 2008, at 8 am.
Expires: Wed, 10 Sept 2008 08:00:00 GMT
Note: It is important to maintain the pushed content in a web location that users can go to if the content is not in the cache on the BlackBerry device. Pushed cache content is stored in the persistent or pushed cache and can be removed for a variety of reasons before the time specified in the Expires header. For example, users might delete the cache, or a BlackBerry device can remove items from the pushed cache to free up space if it runs low on memory.

Please use plain text.
New Developer
MarcusMalinow
Posts: 7
Registered: ‎03-30-2009
My Device: Not Specified

Re: Browser-Channel push issue

I've not tried testing with no connectivity.

 

As mentioned ion my last post I am using the expires header tag to control the expiry date of the local content.

 

 

Please use plain text.
Developer
abarber
Posts: 189
Registered: ‎08-13-2008
My Device: Not Specified

Re: Bronchiole's push issue

Hi

 

There is a difference between using the meta tag and using the headers in the push.

 

You said "I'm setting the expiry date using the meta expires tag in the html to be one month from the date of the push"

 

Are you setting this in the Push HTTP Header? In the same way as the Content-Location header?

Please use plain text.
New Developer
MarcusMalinow
Posts: 7
Registered: ‎03-30-2009
My Device: Not Specified

Re: Bronchiole's push issue

Hi,

 

I'm not setting it using the Push http header, mainly because when I was testing this didn't seem to work. Admittedly I tested using older models off BB's (7200's I believe).

 

The META tag in the html seems to be respected most of the time however, it's only on occasion that the local content is ignored.

 

I'll give it a go in the Push Header and see how I get on.

Please use plain text.
New Developer
MarcusMalinow
Posts: 7
Registered: ‎03-30-2009
My Device: Not Specified

Re: Browser-Channel push issue

Ok, I've done a little more investigation of this.

 

I don't think page expiry is the issue here.

 

As mentioned I'm pushing out the page which includes the tag:

<meta http-equiv="expires" content="Sat, 2 May 2009 23:59:00 GMT" />

(basically to expire in a month)

 

Sometimes users see the page that I've pushed, at other times they see the page at the "Content-Location" I've provided.

 

If they see the URL, I've tried switching off connectivity, and the cached page is displayed. So, evidently it's still in the device.

 

I've got hold of a BB to test on and will try adding the "Expires" header in the push.

Please use plain text.
Developer
abarber
Posts: 189
Registered: ‎08-13-2008
My Device: Not Specified

Re: Browser-Channel push issue

Are you able to replicate the problem?

 

How are the users navigating to the page?

 

Another thing to think about is:

 

They have to use a url that is exactly the same as the content-location header.

This is case sensitive, so for example.

 

if they type in 

 

www.google.com

 

and you've used www.Google.com in the content-location header, they will not go to the cached page.

 

If you are using a Channel then it should go to the same location everytime.

 

Just a thought.

Please use plain text.
New Developer
MarcusMalinow
Posts: 7
Registered: ‎03-30-2009
My Device: Not Specified

Re: Browser-Channel push issue

Replicating the problem is tricky. Basically if I rerun the push a few times it happens. Expiry definitely isn't the issue here as the cached content won't have the opportunity to reach an age where expiry kicks in.

 

The URL isn't an issue either. I'm pushing the content as a browser-channel push. On my 8310 it appears as an icon on the desktop. On my boss's 8900 it shows up in here downloaded items. Either way neither of us has to actually type a url into our browser.

 

>>If you are using a Channel then it should go to the same location everytime

 

Yep, it *should* always show the cached content, and if that can't be found then it should resolve the URL. That doesn't seem to be happening consistently though.

Please use plain text.