Archive

Posts Tagged ‘firefox’

Cross domain Scripting comes to haunt again

March 6th, 2011 No comments

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

Problem Statement:

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

<html>
<head>
<script type=”text/javascript” charset=”utf-8″ src=”json2.js”></script>
<script type=”text/javascript” charset=”utf-8″ src=”jquery-1.4.4.min.js”></script>
<script>

function invokeFunction()
{

var myService = null;
if (window.XMLHttpRequest) //for mozilla
{
myService = new XMLHttpRequest();

if ( typeof myService.overrideMimeType != ‘undefined’)
myService.overrideMimeType(‘application/json’);
}
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…

IE caching Ajax calls

March 2nd, 2011 No comments

If you have been trying to make a REST call from your javascript or jsp page, you might have found that in firefox(FF) and Safari there is a call made to server every time . But this does not happen in IE.

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

Option 1:

Change the browser settings. To  do this you have to go to

General–Settings>

and change the settings from Automatically to Every Visit to page

This will resolve the issue.

Option 2:

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.

Read more…

Double submits in Firefox browser

February 6th, 2011 No comments

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.

The 500 ft perspective of website performance

September 17th, 2010 No comments

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.

improve website performance Read more…

How to run IE only sites from Linux

June 11th, 2010 3 comments

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…

Categories: Programming / tutorials Tags: ,

Performance issue in IE 7 java Script Engine

March 31st, 2010 No comments

In one of my earlier post  Performance Improvement with Firefox ,  I had mentioned how we had to switch to firefox for our application response time in IE.  Andres in his post Garbage Collection in IE7 heavily impacted by number of JavaScript objects and string sizes is sharing his experience with performance issue in IE 7 java Script Engine .  One of his key recommendations , Be careful with string allocations and objects in memory -> GC in IE7 performs really badly

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

Analyzing web site performance in Firefox with YSlow

March 14th, 2010 No comments

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…

Open new tab instead of new window in Firefox

March 12th, 2010 No comments

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[0], ‘height=1,width=1,left=1,top=1,status=yes,scrollbars=yes,resizable=yes’);

change this to

window.open(”, server[0]);

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…