Sunday, June 26, 2011

Boosting Mozilla Firefox's speed

     This post is continuation of one of my old post . Firefox lets us tweak it in a large number of ways and hence there is always a scope of your getting a better performance out of the browser. For eg, if you are contnuously online and if suppose you donot frequently visit same pages, you may limit the cache size on the disk or ram to reduce the memory usage of the browser to a lower value without much problems. Anyways, coming back to the post.
     Last time I talked about changing the disk and memory cache size of the browser.But, these are not of much use during offline viewing of pages. Certain pages having smart javascripts can make use of the offline caching facility of the browser to serve you better. To provide these with larger size, you just need to increase the size of browser.cache.offline.capacity to a larger value, 100000 in my case.
     It might happen that your browser may have browser.cache.offline.enable false i.e off. So you better turn it on!Just by double clicking it!
     You may also increase the value of image.cache.size Though I donot feel the need to do it. Also one thing should be taken care of. Providing large cache to Firefox will help to a certain extent. Beyond that it will only cause memory related issues.
   These were a few tweaks at the background level of the browser. There is another way to increase the speed also!  Just don't install add-ons without thinking. It may cause the browser to go slow.Also, it is recommended that you constantly update your browser and add-ons.
   There is a known issue with Java Console that while installing new versions, it forgets to remove the older ones so you will have to personally remove them.
   Will meet you soon with new updates, till then keep coding and stay tuned to the blog!

Friday, June 17, 2011

New animation: could be used for tutorial pages

   Many times writing tutorials, you may need to put up some questions for the user to answer. It maybe just to give him an example or for some other reason. But, they all have the same working: type the answer and then press the "check!" button. Some will give an alert saying you are incorrect or others will just put up a text or something.But in all of them you have to press the button.
  Lazy guys like me hate doing that much too! So I prefer to use this code to take in the input:

<input type="text" onkeyup="checkanswer()" onfocusout="back()" id="ans"/>

also to show whether the answer is correct or not, I made this script:

<script type="text/javascript">
function checkanswer()
var check = document.getElementById("ans");
if(check.value=='Your Answer Here')

        function back()

Well the script is self explanatory. After everykeypress, it checks if the answer is correct because of the onkeyup event.If answer is correct, the background colour changes to green, otherwise red. When you move the focus away from the text box the background becomes white away due to the onfocusout event.

This is quite useful for lazy guys like me :)

My main intention was to change the background color of the textbox but could not figure out how to do it so far. So send in your comments on how to do that :)
BTW check the demo here :

Thursday, June 2, 2011

Twitter Sorter

  I'm sure all the tweeters will be following different people for different purposes. Some for news, some people coz they are family, some coz you are their fans and many more reasons. Some of these people tend to tweet a lot and hence you timeline is flooded with their tweets.
  It happens with me many times that Engadget is tweeting excessively while I am not interested in them right now. God! I hate such moments! I always wished that My timeline was sorted according to category. Yes, Twitter has lists and you can read the tweets of the lists but that is too long. Hence, I am making an application called twitter sorter. It sorts all my tweets according to categories. My basic plan is setting the categories according to the Lists created by the user but not all users create lists (damn them!). Also, I wonder wether I should keep the tweets as seperate selectable objects or just show them as texts.
   Well, I am waiting for suggestions so please send them in!