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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Developer
Posts: 6
Registered: ‎08-03-2009
My Device: Not Specified

Cookie issue with Blackberry Browser.

[ Edited ]

Hello there!  I seem to have discovered an issue with the Blackberry browser and cookies.  In the example below, the cookie data does not appear until you hit Refresh from the Blackberry menu.

 

<?php
$Do = $HTTP_POST_VARS['Do'];
if ($Do == "Test") {
  $string = $HTTP_POST_VARS['string'];
  setcookie('string', $string);
  header("Location: test.php");
}
else {
  if (isset($string)) {
    setcookie('string', '', time() - 3600);
    print "
      Your Cookie is: $string
      <br><a href=test.php>Do again</a>
    ";
  }
  else {
    print "
    Input a value for the cookie test:
    <form action=test.php method=post>
      <input type=text name=string size=20>
      <input type=submit name=Do value=Test>
    </form>
    ";
  }
}
?>

 

To reproduce this, simply create a file called test.php on your web server and then test it with the phone.  This works fine on every browser that I can think of for PC and Mac and also seems to work fine on the G1, however, I have tested this with both the Blackberry Storm and the Blackberry Bold and both of these models have the same problem.  The cookie data simply does not show up until I hit 'refresh'.  Likewise, you will notice in the example above that the cookie is destroyed as soon as the data is displayed.  Again, the cookie also does not seem to disappear until after I hit 'refresh'.  At first I thought the issue was due to the page getting re-directed back to itself, however, I also tried redirecting this data to another page called test2.php and the same issue occurred.  If I am doing something wrong, please let me know, otherwise this appears to be a bug in the Blackberry browser since this seems to work fine everywhere else.

Message Edited by chubbard on 08-03-2009 01:45 AM
Message Edited by chubbard on 08-03-2009 01:48 AM
New Developer
Posts: 6
Registered: ‎08-03-2009
My Device: Not Specified

Re: Cookie issue with Blackberry Browser.

Is there any reason no one has responded to this?  Did I post in the wrong spot?  Is this issue already known and in process of being fixed? Do I need to add more information?  Please let me know.
Highlighted
New Developer
Posts: 19
Registered: ‎10-08-2008
My Device: Not Specified

Re: Cookie issue with Blackberry Browser.

You might try submitting it to their JIRA issue tracker. 

http://na.blackberry.com/eng/developers/resources/issuetracker/

New Developer
Posts: 6
Registered: ‎08-03-2009
My Device: Not Specified

Re: Cookie issue with Blackberry Browser.

Thanks for the advice.  I posted the bug.

 

https://www.blackberry.com/jira/browse/WEBAPI-15