Showing posts with label Mozilla Firefox. Show all posts
Showing posts with label Mozilla Firefox. Show all posts

Monday, January 9, 2012

Infinite Redirect and effects on browser

   Its always great to do something that messes your computer! How about doing something that makes your browser take up 50% of your CPU!
  Javascript has window.location object, generally used for redirecting your page.
 e.g. window.location = "http://www.google.com" redirects you to Google homepage.
 What would happen if you redirected the page to itself! An infinite Reload! Just to see how the browsers behave when this happens, I created an html page with a javascript code redirecting it to itself. As expected the result was an infinte reload happened and the browsers gulped 50% of my processor! I was hoping the usage would go up but it didn't :(
  I was wondering if there was any way, that the browsers could stop this from happening.I found 2 solutions:

1.The browsers can keep a count of number of reloads of a page and on reaching a certain number, the browser can simply kill the page or stop it from refreshing. But then, sites keeping live scores tend to keep on refreshing and you wouldn't like it when the site stops loading at a crucial moment in the game! The solution to this problem could be browsers keeping a count of average time between 2 reloads. If the time is smaller than some smaller certain amount, the page can be stopped from reloading.

2. Web browsers get the javascript code right? So, they can simply ignore the line where the page redirects to itself, if the code line is not within some function. Maybe the

  

Saturday, March 12, 2011

Chrome A more developer friendly browser

                   I support Mozilla firefox a lot because it is an open-source web-browser. Not saying that it is not good but Chrome is also good. There are many factors where Chrome beats firefox as a better browser. One of those aspects is how easy it is for developers to create new add-ons. Lets face it, The features in built in a browser are never enough for us. Most of us are using some or the other add-on. Thus, making it easy for developers to make new applications makes your browser tick more because you don't know how imaginative/innovative the developers are.
                  Chrome beats Mozilla hands down in this aspect. Mozilla has several add-ons but Chrome has better(thanks to Google) and more in number. The second point is because of the number of developers.
This year, as a part of my ACM project I thought of making some cool Mozilla add-on as I had never used Chrome before.But, while going through the tutorial , I was unable to complete even the sample add-on. After trying for 2-3 times more I gave up on it and eventually moved on and made a windows mobile application.
In December 2010, Google launched the chrome web-store and had a big event. So, I thought of trying out the browser and Wow! how great the feeling was when I went to the link for the webstore. It was full of amazing extensions and so many of them! After using it for a month or so, I got curious and wanted to make one extension for myself. So i went to the google code page for tutorials and found it ridiculously easy compared to the Firefox tutorial(Again thanks to Google).
                I went through different examples and within a week I had my first application ready!Now I have made another simple extension for searching the same term in different search engines and believe me it was very easy to make.No fuss of making several folders for manifest , chrome and xul. Just one folder and you are set.
              I would request the Mozilla people to make the add-on making process a little easier for developers.