Wednesday, January 12, 2011

[Devils Workshop] “Best Practices – Writing Efficient CSS For Faster Page Load” and 3 more...

[Devils Workshop] “Best Practices – Writing Efficient CSS For Faster Page Load” and 3 more...

Link to Devils Workshop

Best Practices – Writing Efficient CSS For Faster Page Load

Posted: 12 Jan 2011 04:30 PM PST


css stamp Best Practices   Writing Efficient CSS For Faster Page LoadIn my previous CSS post I wrote about how one can remove unwanted CSS using Tech 1 and Tech 2. And this article contains few CSS tips that every CSS developer must know.

Avoiding inefficient key selectors that match large numbers of elements can speed up page rendering.

How to use CSS selectors Efficiently

ID’s is the most efficient Selector whereas Universal Selector is the least efficient. There are four kinds of key selectors. Each of them are rendered with different efficiencies.

  1. ID                        (Fastest to)
  2. Class
  3. Tag
  4. Universal             (Slowest)

The browser reads the selector from right to left. It means that in the selector  ul > li a the first thing interpreted is "a". This first part is also referred to as the “key selector”, it is the element being selected. Now below is few examples generally we use in our Stylesheet.
#sidebar { }                 /* ID  */
.side-nav{ }                 /* Class */
ul { }                       /* Tag */
* { }                        /* Universal */
body.home #container { }     /* Descendent selectors class and ID*/
ul li a.current { }          /* Descendent selectors-class *
ul li a { }                  /* Descendent selectors-Tag */
#content [title='home']      /* Universal */

When we use the child selector it is not very efficient to use, as it takes a lot of time to interpret.

#sidebar > li { } /* Slower than it might seem */

Since ID’s are so efficient we would think the browser could just find that ID quickly and then find the li children quickly. But actually, the relatively slow li tag selector is run first.

Tag qualify technique should be avoid because ID’s are unique, they don’t need a tag name to go along with it. It makes the selector less efficient. And it is better to avoid with the classes too even though they are not unique. We can make use of it in exceptional cases like li.first but that’s pretty rare.

ul#custom-list { }

Descendant selectors are the worst technique and most expensive. In other words it is the least efficient, for each element the CSS engine matches the key selector, the browser also have to traverse up the DOM tree, evaluating every ancestor element until it finds a match for the root element. The less specific the key, the greater the number of nodes that is to be evaluated.

html body ul li a {  }

Font-family cascades, so you may not need a selector to specify like specified in the 1st example. The 2nd one is as effective and far more efficient than the 1st one.

  1. #container li a { font-family: Georgia, Serif; }
  2. #container { font-family: Georgia, Serif; }

Do you find this article useful? Do let me know through your comments.


Related posts:

-- This Post Best Practices – Writing Efficient CSS For Faster Page Load is Published on Devils Workshop .

Online Tip – Avoid spam with disposable E-mail account

Posted: 12 Jan 2011 07:30 AM PST


Couple of days ago, Ankit Das reviewed a SEO tool called Traffic Travis. The software could be downloaded but to test it, I needed to register with an email address. I usually get sceptical of such sites that ask for email, because this is how your inbox can end up being spammed.

10 Minute Mail is a nice online service which creates disposable E-mail address for us to register and work. As the name suggests, the email account lasts for only 10 minutes.

10 minute mail thumb Online Tip   Avoid spam with disposable E mail account

10 Minute Mail Features

  • When you visit the URL, a temporary email address is automatically created.
  • This can be copy-pasted anywhere. The email notification can be see at the page itself. This email id self-destructs after 10 minutes.
  • A good thing is if you need another 10 minutes then that option also exists.

Over years there have been a lot of filters, court orders and more to deal with email spam. Fact is spam seems to just keep increasing. This is why I think it is better we use innovative services like 10 Minute Mail. What are your views ? Do drop in your comments.

Link: 10 Minute Mail

Related: Guerilla Mail


Related posts:

-- This Post Online Tip – Avoid spam with disposable E-mail account is Published on Devils Workshop .

Check if you can run a game on your PC with Online Tool

Posted: 12 Jan 2011 04:57 AM PST


Sometimes you wonder before installing a game to your system whether it can run on your system or not. Here is a website to check the game’s compatibility on your system.

Can You Run It?

It is a special service by Systemrequirementslab.com.This service is an online tool,using which you can check whether the game you brought from your friend or mate after installing will run on your system(computer) configuration or not.This works with Java and takes some time(not much justs a minute or less).

How to check whether you can Run a Game on your system

  1. Go to the Can You Run It? page.
  2. Type in the name of the game  to search or you can select the game from the list too.
  3. 1 11 2011 10 16 38 PM Check if you can run a game on your PC with Online Tool

  4. Then click on Can You Run It? button.
  5. After this the website will start analyzing your system for compatibility with the selected game. Click on run when your computer asks for allowing the java program to help the website analyze the system.
  6. 1 11 2011 10 20 35 PM Check if you can run a game on your PC with Online Tool

  7. After some time it will display a page showing the results,in which you will see all of your configuration results (which configurations passed to run the game and which failed).
  8. 1 11 2011 10 21 39 PM Check if you can run a game on your PC with Online Tool

  9. If any of the configuration fails then, you will not be able to run that game on your system.
  10. For failed configurations, the website provides some recommendations,you can check them.These recommendations will bring you to company websites from where you can buy the configuration(parts) [This step is not necessary].

Link: Can  You Run It?


Related posts:

-- This Post Check if you can run a game on your PC with Online Tool is Published on Devils Workshop .

FoxyTunes – Control music applications on Desktop from your browser

Posted: 12 Jan 2011 03:45 AM PST


Is it always hard for you to change the music track on your computer while you are working on something important on your browser? If you are a Firefox user, this add-on shall be a great relief for you. Foxytunes integrates within your Firefox and let you play what you really want to. It supports a wide-range of players for almost all Operating system platforms including iTunes, Winamp, Window Media Player, JetAudio and Real Player. It even supports players exclusive to Linux OS such as XMMS and even iTunes for Mac OS. It has not even ignored Cross-platform players like YouTube, Last.fm and Songbird.

DW foxytunes6 thumb FoxyTunes   Control music applications on Desktop from your browser

Features

  1. Foxytunes lets you control the player you already have. It provides support for many players available for Windows, Linux, Mac OS X and even online-players.
  2. DW foxytunes4 thumb FoxyTunes   Control music applications on Desktop from your browser

  3. Control the volume, mute instantly when you are getting a call!
  4. DW foxytunes1 thumb FoxyTunes   Control music applications on Desktop from your browser

  5. See what you are playing directly on the Status bar. It is even easy to seek or even change tracks without even looking at the player window.
  6. DW foxytunes2 thumb FoxyTunes   Control music applications on Desktop from your browser

  7. A number of skins are available for free to give you a personal feel and freedom of choice.
  8. DW foxytunes3 thumb FoxyTunes   Control music applications on Desktop from your browser

  9. It is fully integrated with Yahoo Online Radio which you might have seen on your Yahoo Messenger software. It directly synchronizes with the Yahoo server and plays it right within your Firefox.
  10. There are many other features which makes FoxyTunes the best available Music control tool for your Firefox.
  11. DW foxytunes5 thumb FoxyTunes   Control music applications on Desktop from your browser

Link: FoxyTunes official website


Related posts:

-- This Post FoxyTunes – Control music applications on Desktop from your browser is Published on Devils Workshop .

0 comments: