In my last posts I had talked about Cross domain scripting issue with Firefox and how to solve cross domain scripting issues on tomcat
But looks like the issue has not been completely resolved. I have used the CORS filter solution as we are working on tomcat but have some problems in exception scenarios
I am trying to make a call to a REST service and trying to catch an 404 or 200 condition returned by REST and show an appropriate message to user based on error code.
My url in browser is http://localhost:8080/myapp/test.html
The code inside is
var myService = null;
if (window.XMLHttpRequest) //for mozilla
myService = new XMLHttpRequest();
if ( typeof myService.overrideMimeType != ‘undefined’)
else if (window.ActiveXObject) //for IE
myService = new ActiveXObject(“Microsoft.XMLHTTP”);
var serviceUrl = “http://127.0.0.1:8080/myapp/webresources/user/1111“; Read more…
This is the scenario I had
I had script file client.js which was making a rest call to get some data.
First time I could see the results but then with every other subsequent call, there was no change in state, although the data should have changed.
Now this can be fixed by multiple ways
Change the browser settings. To do this you have to go to
and change the settings from Automatically to Every Visit to page
This will resolve the issue.
Change from GET to POST
Option 3 :
Add a timestamp at end of url which will looking at which server will think it is a new URL.
If you had ever experienced double form submit in your application in Firefox, ,here is the clue
It could be because of the Firebug. For me at least the problem was firebug.
I was on version 3.5.8 of firefox and the version of firebug installed with this version had bug.
I had to upgrade to firefox 3.6 to get latest version of firebug and then this problem did not happen.
Alternatively turn of firebug or any other recent add on you installed and this double form submission problem should go away.
Let us start with this simple questions, What are the engineers at google are obsessed with ?
Answer : Speed
Google instant was the latest delivered in search in which google displays search result as soon as you start punching your keyboard. By predicting your search and showing results before you finish typing, Google Instant can save 2-5 seconds per search.
Google’s spoke person Matt Cutts had also made it clear that the sites which will perform slow , will be penalized.
So what is the next thing web developers around the world will start work towards (They have been working towards it , but now they might get obsessed) ?
Yes you are right . Improve the performance of their website/application.
Sounds stupid ? Why would you want to run IE from Linux ? Why not use Firefox or Chrome ?
But that is not always the scenario.
Reason no 1 : Web designers who use Linux need to test their site on IE . Do not forget IE still commands majority of browser market 59.95%. Can you afford to ignore IE .
Obviously not !
Reason no 2 : Organizations who have created IE only applications 7-10 years back and are now switching to Linux platform , do not want to spend time and money porting the application to new browsers.
So when confronted with this problem what can be done ?
Solution 1 :
If you have windows as your OS then you can use this fantastic plugin IE Tab for Firefox. I have tried this and our UI was pretty heavy bit worked perfectly fine with plugin. I think as of date, the developers are not supporting this plugin so you might not be able to find upgrade for latest version of Firefox. There are other plugins similar to IE tab in firefox which you wanna try out.
Drawback : This does not work on Linux.
Solution 2: Read more…
There is another presentation by Frank on browser problem in AJAX application in which he used PushToTest TestMaker to drive an Ajax application on IE 6 and 7 and on Firefox 3. to find out why some Selenium tests of Ajax applications were running at 3 minutes while the same test on a different browser took 30 minutes. You can find the details here Browser problems in AJAX applications
Web developers and applications developers must have faced this problem related to performance of their Websites.
In this post I will focus of how to track website performance. Remember the websites behave different under different browsers so if your site loads faster in FireFox , it may not load with same speed in IE.
Firefox has some very good plugins to track the performance of your website. The two plugins which I really like are
1. Yslow : ySlow analyzes web pages and suggest how to improve performance based on yahoo’s rule for high performance website. You may not agree with some of the recommendations but nevertheless , it gives very good feedback.
2. FireBug : Firebug is not only an excellent tool for editing and debugging java script, html , css but also helps you analyze the performance of pages. Read more…
We had a requirement in which we wanted to open an applet in a new tab instaed of new window.
Here is how to do it
window.open(”, server, ‘height=1,width=1,left=1,top=1,status=yes,scrollbars=yes,resizable=yes’);
change this to
This will open the applet in new tab. As soon as you remove sizing parameters, it will open as a new tab.
But there is one issues here. The focus is on the applet tab instead on main screen. Read more…