Showing posts with label browser. Show all posts
Showing posts with label browser. 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

  

Wednesday, November 17, 2010

Boosting your browsing speed in Mozilla

you may be happy with the time it takes for a webpage to load in Mozilla but getting a better browsing speed is always a welcome change isn't it? Here is a simple way to boost your speed.
->Open a new tab and in the address-bar type: about:config
->Now in the box of filer type browser.cache
->Now turn the value ofbrowser.cache.disk.enable to false. It can be done by just double clicking it.
->Similarly set browser.cache.memory.enable to true.
->Now right click on an empty space select new->integer and give it name : browser.cache.memory.capacity and in the give it value100000 or 100Mb.

Mind you this will store the cache in main memmory and may take upto 100Mb of your RAM.So just take care of not giving some superficial value as capacity.Also, the process will increase the speed of cached pages only.Anyways, any betterment is welcome isn't it?