Energy Saving Javascript

Energy Saving ScriptTitle of this post may seem strange to you but this is true, You can actually save some energy by using this Javascript on your website. Let me tell you how.

This javascript turns the webpage black if there is no user activity on the page for some time. As the page predominantly turn black the script in-effect saves energy.

Image displayed is primarily a function of the user's color settings and desktop graphics, as well as the color and size of open application windows; a given monitor requires more power to display a white (or light) screen than a black (or dark) screen.

Roberson et al, 2002.

Just have a look at the Demo to see how it looks:

Energy Saving Javascript Demo

How to Use

Using this script is damn simple just place following script tag anywhere in the page. It would be good if you place this script just before </body>

<script src="http://apps.nitinh.com/energy.js?time=100&amp;credit=0" type="text/javascript"></script>

Configuration

There are two configurable parameters:

  • time : This is the amount of idle time before which the screen turn black. The time is in number of seconds and its value should be greater than 10.
  • credit : This is boolean field to show / hide credits in Black Screen. Values could be 1 or 0

Hope this script saves some of the valuable world energy.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Other Posts which you may like:

9 responses to “Energy Saving Javascript”

  1. Ryan

    Don’t forget about touch events now too. iDevice users could get locked out of the page if you don’t also include listeners for something like touchstart.

  2. Leo

    Great Idea!

  3. Navarr

    Didn’t google say that the opposite of this was true for LCDs?

  4. Jonas Elfström

    The wast majority of screens are not LCD based. LCDs are constantly back lit and thus a black screen saves nothing, sometimes it even draws slightly more.

  5. Jonas Elfström

    Should have been “The wast majority of screens are now LCD based”

  6. Mike

    LCD screens use more power to display a black screen, and the cycles you’re using to show/hide it would probably use more power that it saves.

    I can also see this being incredibly annoying when you’re trying to read a long article.

  7. Eli Grey

    Unless all of your visitors are using OLED screens, you’re not saving any power by doing this.

  8. Joel

    What was true in 2002 is not necessarily true today. The dominant monitor at that time was the CRT, and the claim would remain true if that had stayed the course, however LCD monitors have since taken over – being backlit, they do not save illumination energy, and if you’ve read the research papers, the energy loss occuring to create a black screen is higher than a white screen (voltage applied to twist the polymer to blackout the light).

    By all means, offer such solutions, but ensure that you inform your readers:
    - what technology it will save energy with;
    - your sources for your quotes regarding energy savings; and
    - caveats/limitations of your claims.

  9. Maximize Your Investment with Phoenix Rental Property | The Real Estate Investment Gal

    [...] Energy Saving Javascript [...]

Leave a Reply

Subscribe Me

Google Custom Search