Major Javascript Bug in Newer OS Builds (0.90 - 0.99)
- I think I've found a bad bug in the javascript handling by the newer OS builds. In short, no code inside a <script> tag will be executed. Script execution is a core functionality of the Blackberry Browser.
Here's proof -- Visit the following page from your 0.90-0.99 Blackberry Browser: http://stormhome.freehostia.com/bugtest.html. Visit the same page from your computer browser and see the difference.
On any browser that does support basic javascript, including Storm OS versions up to 0.86, this will generate a page reading as follows:
This browser is NOT broken
However, on the newest Storm beta OS versions (0.90 through 0.99) this results in the following page:
This browser is broken
This is true no matter what your javascript settings and no matter what your other browser settings.Last edited by mkleiman; 02-06-09 at 12:26 PM.
02-04-09 01:04 PMLike 0 - wow, nice find. it may be the cause as to why the browsers have been reported to have been cutting off pieces of pages02-04-09 01:12 PMLike 0
- Good thought, but I've confirmed this problem exists even with fully articulated script tags (e.g., <script language="JavaScript" type="text/javascript">).02-04-09 01:17 PMLike 0
-
This bug kills everything that made the Blackberry Browser on par with other modern mobile browsers. As of now, its no better than a dumbphone wap browser.02-04-09 01:52 PMLike 0 - Note: the test page has been edited to make it more clear whether the browser is working or broken.
Test page: http://stormhome.freehostia.com/bugtest.html02-06-09 11:22 AMLike 0 -
-
[php]<HTML>
<HEAD>
<SCRIPT language=javascript>
var hostName = "www.homedepot.com";
var httpPort = window.location.port;
if (httpPort && httpPort != "" && httpPort !=80) hostName += ":" + httpPort;
var u = "http://"+hostName+"/webapp/wcs/stores/servlet/HomePageView?storeId=10051&catalogId=10053&langId=-1"
if(document.referrer != ""){
u += "&orig_ref=" + encodeURIComponent(document.referrer);
}
window.location.replace(u);
</SCRIPT>
<NOSCRIPT>
<META HTTP-EQUIV = "refresh" content = "0; url=/webapp/wcs/stores/servlet/HomePageView?storeId=10051&catalogId=10053&langId=-1">
</NOSCRIPT>
</HEAD>
</HTML>[/php]
Its a javascript script that sends you to the "real" home page depending on your URL referrer. On 0.99 the <script> does not work, so you get a blank page.
If homedepot.com works for you in 0.99 it is because you have javascript turned OFF in your browser preferences. In this case, the browser is simply using the <noscript> tag and you get sent to a real page. Turn javascript ON and re-enter homedepot.com in the address bar -- you will get a blank page.Last edited by mkleiman; 02-06-09 at 12:10 PM.
02-06-09 12:05 PMLike 0 - Excellent example. Here's the code of the homedepot.com page:
[php]<HTML>
<HEAD>
<SCRIPT language=javascript>
var hostName = "www.homedepot.com";
var httpPort = window.location.port;
if (httpPort && httpPort != "" && httpPort !=80) hostName += ":" + httpPort;
var u = "http://"+hostName+"/webapp/wcs/stores/servlet/HomePageView?storeId=10051&catalogId=10053&langId=-1"
if(document.referrer != ""){
u += "&orig_ref=" + encodeURIComponent(document.referrer);
}
window.location.replace(u);
</SCRIPT>
<NOSCRIPT>
<META HTTP-EQUIV = "refresh" content = "0; url=/webapp/wcs/stores/servlet/HomePageView?storeId=10051&catalogId=10053&langId=-1">
</NOSCRIPT>
</HEAD>
</HTML>[/php]
Its a javascript script that sends you to the "real" home page depending on your URL referrer. On 0.99 the <script> does not work, so you get a blank page.
If homedepot.com works for you in 0.99 it is because you have javascript turned OFF in your browser preferences. In this case, the browser is simply using the <noscript> tag and you get sent to a real page. Turn javascript ON and re-enter homedepot.com in the address bar -- you will get a blank page.
i got to be honest, i keep javascript off anyways because it slows the browser to a hault to use it and makes pages take into the minutes to load.
with this bug or without it, i think this browser is far from a usable javascript/ajax browser.02-06-09 03:04 PMLike 0 -
In any event, while I accept that you don't care about this bug, that's not really the point of the thread. There are many people who do care about having functional javascript, and I suspect, a great many more who would care if they understand the significance of the bug.
The homedepot.com example really brings it home...on any other browser in the world, you'd get to the content one way or another. But with beta OS 0.90-0.99 and its broken javascript you get a blank page. That's simply not acceptable.02-06-09 03:14 PMLike 0 - While I agree that javascript processing time could be better with the Storm, its a bit extreme to call it "unusable." Code that is written with the browser's capabilities in mind will execute swiftly and flawlessly. My own Custom Home Page is just one example. It uses extensive javascript and AJAX ... and loads in seconds.
In any event, while I accept that you don't care about this bug, that's not really the point of the thread. There are many people who do care about having functional javascript, and I suspect, a great many more who would care if they understand the significance of the bug.
The homedepot.com example really brings it home...on any other browser in the world, you'd get to the content one way or another. But with beta OS 0.90-0.99 and its broken javascript you get a blank page. That's simply not acceptable.
i have seen many reviews (i think some even during round robin) where the 4.6/4.7 browser was compared to other browsers with javascript and on a off. i remember a couple tests where it was something like
with javascript off
bb 48 seconds
iphone 35 second
and with javascript on
bb 2 min 30 seconds
iphone 55 seconds
those are from my memory, but as you can see its pretty bad.02-06-09 06:13 PMLike 0 -
Perhaps this is a secret plot by RIM to improve the browser benchmarking.02-06-09 06:35 PMLike 0 -
-
- Forum
- BlackBerry OS Phone Forums
- More BlackBerry Phones
- BlackBerry Storm Series
Major Javascript Bug in Newer OS Builds (0.90 - 0.99)
LINK TO POST COPIED TO CLIPBOARD