Thursday, August 30, 2012


Ultimate Guide To Web Optimization (Tips & Best Practices)


Web optimization is a vital part of web development and maintenance but also something often overlooked by webmasters. Just think of the money you can save, and how it can potentially help increase your readership and traffic when they are properly done.
web optimization guide
<span class="fullpost">
If you have not done any optimization to your website (or blog) so far or merely curious how it can help speed up your site, please take a look at this list of optimization tips we’ve put together.
We’ve split things up into 3 separate sections for better readability – respectively server-side optimizationassets optimization (which includes web components like CSS, Javascript, images, etc) and platform, where we’ll focus on WordPress optimization. At the last section, we throw in a couple of links we figured useful. Full list after jump.

Optimization: Server-Side

  1. Choose A Decent Web Host

    Your web hosting account has no direct relationship with the optimizations you are about to perform but we figured choosing the right web hosting account so important we decided to bring it to your attention first. Hosting account is the foundation of your website/blog where it’s security, accessibility (cPanel, FTP, SSH), server stability, prices and customer supports all play important roles. You need to make sure you are in good hands.
    Recommended reading:
    How to Choose a Web Host
     by wikiHow is a great article that gives you steps and tips you should know before purchasing any web hosting account.
  2. Host Assets Separately

    When we mention assets, we meant web components like images and static scripts that don’t require server-side processing. These includes any web graphics, images, Javascripts, Cascading Style Sheets (CSS), etc. Hosting assets separately is not a must, but we’ve seen tremendous result in terms of server stability with this implementation when the blog was having a traffic spike.
    Recommended reading
    Maximizing Parallel Downloads in the Carpool Lane.
  3. Compression With GZip

    In short, contents travel from server side to client side (vicet versa) whenever a HTTP request is make. Compressing the content for sending greatly reduce the time needed to process each request.
    GZip is one of the best ways to do this and it various according to the type of servers you are using. For instance, Apache 1.3 uses mod_zip, Apache 2.x uses mod_deflate and here‘s how you do it in Nginx. Here are some really good articles to get you familiar with server side compressions:
    • Speed up a web site by enabling Apache file compression
    • Compress Web Output Using mod_gzip and Apache
    • How To Optimize Your Site With GZIP Compression
    • Server-side compression for ASP
  4. Minimize Redirects

    Webmasters do URL redirect (whether it’s Javascript or META redirects) all the time. Sometimes it’s purpose is to point users from an old page to new, or merely guide users to the correct page. Each redirect create an additional HTTP request and RTT (round-trip-time). The more redirection you have, the slower user will get to the destination page.
    Recommended reading:
    Avoid Redirects by Google Code gives you a good overview on the matter. The article also recommends some practical ways to minimize redirection to increase serving speed.
  5. Reduce DNS Lookups

    According to Yahoo! Developer Network Blog, it takes about 20-120 milliseconds for DNS (Domain Name System) to resolve IP address for a given hostname or domain name and the browser cannot do anything until the process is properly completed.
    Author Steve Souders suggested that splitting these components across at least two but no more than four hostnames reduces DNS lookups and allow high degree parallel downloads.Read more on the article.

Optimization: The Assets (CSS, Javascripts, Images)

  1. Merge Multiple Javascripts Into One

    Folks at rakaz.nl shares how you can combine multiple Javascripts like:
    http://www.creatype.nl/javascript/prototype.js
    
    http://www.creatype.nl/javascript/builder.js
    
    http://www.creatype.nl/javascript/effects.js
    
    http://www.creatype.nl/javascript/dragdrop.js
    
    http://www.creatype.nl/javascript/slider.js
    
    Into a single file by changing the URL to:
    http://www.creatype.nl/javascript/prototype.js,builder.js,effects.js,dragdrop.js,slider.js
    
    by manipulating the .htaccess and using PHP. Click here to read more.
  2. Compress Javascript & CSS

    Minify is a PHP5 app that can combine multiple CSS and Javascript files, compress their contents (i.e. removal of unnecessary whitespace/comments), and serve the results with HTTP encoding (gzip/deflate) and headers that allow optimal client-side caching.
    minify
    Compress them online!
    compress css
    There are also some web services that allow you to manually compress your Javascripts and CSS files online. Here are few we come to know:
    • compressor.ebiene (JavascriptCSS)
    • javascriptcompressor.com (Javascript)
    • jscompress.com (Javascript)
    • CleanCSS (CSS)
    • CSS Optimizer (CSS)
  3. Customize Header Expiry/Caching

    header expiry
    Credit: httpwatch
    By using a customized Expiry header, your web components like images, static files, CSS, Javascript skipped unnecessary HTTP request when the same user reload the page for the second time. It reduces the bandwidth needed and definetely help in serving the page faster.
    Recommended readings:
    • Yahoo! Developer Network Blog – Add an Expires Header
    • How To Add Good Expires Headers to Images in Apache 1.3
    • HTTP Caching
    • Caching Tutorial for Web Authors and Webmasters
  4. Off-Load The Assets

    By off-loading, we mean separating the Javascripts, images, CSS and static files from main server where the website is hosted and place them on another server or rely on other web services. We’ve seen significant improvement here in Hongkiat by off-loading assets to other web services available, leaving the server to mainly do the PHP processing. Here are some suggestions of online services for off-loading:
    • Images: Flickr, Smugmug, Paid hostings*
    • Javascripts: Google Ajax Library, Google App Engine, Paid hostings*
    • Web Forms: WuFoo, FormSpring
    • RSS: Google Feedburner
    • Survey and Polls: SurveyMonkey, PollDaddy
    *Paid hostings – Paid services always have better reliability and stability. If your website is constantly requesting for the assets, you’ll need to make sure they are in good hands. We recommend Amazon S3 and Cloud Front.
  5. Handling Web Images

    Images are important part of your website. However if they are not properly optimize, they can become a burden and end up utilizing unpredictably large amount of bandwidths on daily basis. Here are some best practices to optimize your images:
    • Optimize PNG Images
      Folks at Smashing Magazine describes some clever techniques that may help you optimize your PNG-images.
    • Optimizing for Web – Things you need to know (the formats)
      Learn more about Jpeg, GIF, PNG and how you should save your images for web.
    • Don’t Scale Images
      Always practice inserting the width and height for each images. Also don’t scale down an image just because you need a smaller version on the web. For example: Do not force scale a 200×200 px image to 50×50 px for your website by altering the width and height. Get a 50×50 px instead.
    Optimizing with Web Services and Tools. Good news is, you don’t need to be a Photoshop expert to optimize your images. There are plenty of web services and tools to help you do thejob.
    • Smush.it
      smushit
      Probably one of the most efficient online tool to optimize images. There’s even aWordPress plugin for it!
    • JPEG & PNG Stripper
      A Windows tool for stripping/cleaning/removing unnecessary metadata (junk) from JPG/JPEG/JFIF & PNG files.
    • Online Image Optimizer
      Lets you easily optimize your gifs, animated gifs, jpgs, and pngs, so they load as fast as possible on your site, by Dynamic Drive
    • SuperGIF
      Effortlessly make all your GIF images and animations smaller.
    • Here’s more.
  6. Handling CSS

    Modern websites uses CSS as the foundation of the style, as well as the look and feel. Not only CSS gives great flexibility to changes, it is also lesser in terms of codes needed. However, if they are badly coded, it could be a backfire. Here are some checklists, or rather guides to you make sure your CSS are properly optimized:
    • Keeping Your Elements’ Kids in Line with Offspring
      How to keep your markup clean with CSS Selectors.
    • Keep CSS short
      When they give the same style, the codes are better the shorter they are. Here’s aCSS Shorthand guide you’ll probably need.
    • Use CSS Sprite
      css sprite
      CSS Sprite technique reduce HTTP request each time a page is load by combining several (or all) images together on a single image file and control it’s output with CSS background-position attribute. Here are some useful guides and techniques to create CSS Sprites:
      • Creating easy and useful CSS Sprites
      • Online CSS Sprite Generator
      • Best Online And Offline CSS Sprites Generator
    • Using every declaration just once
      When looking to optimize your CSS files, one of the most powerful measures you can employ is to use every declaration just once.
    • Reduce amount of CSS files
      The reason is simple, the more CSS files you have the more HTTP request it’ll have to make when a webpage is being requested. For example, instead of having multiple CSS files like the following:
                <link rel="stylesheet" type="text/css" href="main.css" />  
                <link rel="stylesheet" type="text/css" href="body.css" />   
                <link rel="stylesheet" type="text/css" href="footer.css" /> 
      You can combine them into the one single CSS:
                <link rel="stylesheet" type="text/css" href="layout.css" />
             
    Recommended readings:
    • Useful Tools To Check, Clean & Optimize Your CSS File
      Some of the useful tools that you can use to optimize your CSS code, even if you have completely no knowledge of CSS coding.
    • 7 Principles Of Clean And Optimized CSS Code
      Optimization isn’t just minimizing file size – it’s also about being organized, clutter-free, and efficient.
    • Best Practices to optimize CSS
      Consider this article more like an academic exercise rather than real-life optimization tips.

Optimization For WordPress

From time to time, we monitor, benchmark and analyze the performance of our WordPress blog. If the site is running slow, we need to know why. Here are some basic changes we’ve done and we figured will significantly increase the speed of your WordPress blog.
  1. Cache Your Worpress Blog

    WP-Cache is an extremely efficient WordPress page caching system to make you site much faster and responsive. We also recommend WP Super Cache which enhances from the previous mentioned plugin and too does a great job.
  2. Deactivate And Delete Unused Plugins

    When you notice your blog is loading real slow, see if you have a lot of plugins installed. They might be the culprit.
  3. Remove Unnecessary PHP Tags

    If you take a look into your theme’s source codes, you will find a lot tags like these:
            <?php bloginfo('stylesheet_directory'); ?>
            
            <?php bloginfo('description'); ?>
            
    They can be pretty much replaced with text content that don’t cause load to the server. Check out Michael Martin‘s 13 Tags to delete from your WordPress Blog
Recommended Readings:
  • 3 Easiest Ways to Speed Up WordPress
    John Pozadzides shares how his blog sails smoothly through a Digg traffic spike.
  • 13 Great WordPress Speed Tips & Tricks for MAX Performance
    Here are a few things to try if you find that your WordPress site is not performing as well as it could be due to high traffic or hidden issues you don’t know about.
  • 40 WordPress Optimization Tips
    Optimization tips in slides. 40 tips in 40 minutes.

Last But Not Least…

Here are some useful web services and tools that gives you a broader perspective and better analyzation to help you in web optimization.
  • Yahoo! YSlow

    YSlow analyzes web pages and suggests ways to improve their performance based on a set ofrules for high performance web pages. It gives you a good idea what needs to be done in order for the website to load faster.
    (Firebug required)
    yahoo yslow
  • PageSpeed

    Similar to Yahoo! YSlow, Google Page Speed is an open-source Firebug add-on to evaluate the website performances and how to improve them. (Firebug required)
    pagespeed
  • Pingdom Tools

    Pingdom Tools take a complete load of your website including all objects (images, CSS, JavaScripts, RSS, Flash and frames/iframes) and shows you general statistics about the loaded page such as the total number of objects, total load time, and size including all objects.
    pingdom

Read more »

Thursday, August 23, 2012


Fix a broken USB thumb drive



QUESTION Windows Explorer no longer displays the icon for my external USB drive. Device Manager tells me 'This device is working normally', but uninstalling and reinstalling the drivers hasn't brought back my icon. I use Avast, Spysweeper, A-Squared Malwarebytes, Spybot and Microsoft Security Essentials. Keay Smith
HELPROOM ANSWER First, I suggest you cut back on all the security software. They aren't designed to work together and may actively conflict with each other and hamper PC performance.
The hard-drive issue could be down to several things. Try reinitialising it in Disk Management. Go to Start, right-click Computer, Manage, Disk Management. If the drive is listed there but described as 'Unallocated', there may be a fault. Right-click the drive and select 'New Simple Volume'. Follow the instructions given.
It's also possible that the drive has stopped working. To establish this, try using a different external drive or taking the disk out of its chassis and connecting it to the machine internally.

Read more »


How to Make Your iPhone 3G Faster on iOS 4



  

If you have an iPhone 3G running iOS 4, you know how painfully slow your device can be. This is due to the fact that iOS 4 was designed for more powerful devices like the iPhone 3GS and the iPhone 4.

iPhone hacker Comex tweeted a link to a MMI article showing how you can easily make your iPhone 3G on iOS 4 faster. Apparently, turning off Spotlight Search does the trick.

To do so, go to Settings > General >Home Button > Spotlight Search, then turn off everything and reboot your iPhone.

I don’t have an iPhone 3G so I wasn’t able to verify this but looking at all the positive comments over at MMI, I assume this is working like a charm.

Source Link- 

Read more »


How-To: Build yourself a front projection home theater



In today's How-To we get to play with other people's toys. We upgraded a home theater to a high definition front projection system. We lay it out, set it up, drill holes, nearly die in a Texas attic, and bring home the popcorn.

Our project home theater already has the essentials for taking advantage of a high definition display: a progressive scan DVD player with component video output and a hi-def DISH Network satellite receiver provide a HD video source for the projector.

Screen Selection
It may seem counter intuitive, but it's helpful to consider (but not purchase) the screen before choosing a projector. Knowing the size of screen you want in your room will determine where the projector needs to be mounted, and how bright it needs to be. If you're not sure, marking out the dimensions of the screen with some blue masking tape and checking out the view from your seating area can be helpful. Click on to read the rest of this week's How-To! 


It's wise to consider the content you intend to view when choosing your screen. 16:9 (the ratio of width to height) is standard for HDTV content as you well know. The widest movies are presented in 2.35:1 format; standard definition television is 4:3. We've drawn these as constant height, just to give a rough idea of the differences. Check out the Letterbox and Widescreen Advocacy page for a great explanation.

After a few days of debating, the owner of our project theater determined that he wanted a 100 inch diagonal (49 x 87-inch) 16:9 screen. 



The projector is the heart of any projection system. We selected the Panasonic's PT-AE900U high contrast LCD projector. It displays 1280 x 720 resolution and has plenty of inputs (2 component, HDMI, VGA, S-video, etc.) and a great user reputation. The $400 rebate from Panasonic makes it even more attractive to the bargain hunting AV geek.



The screen size you want will determine how far away the projector needs to be mounted. This information is usually found in a table in the projector manual. Calling the manufacturer or downloading the manual is a good way to get this information. According to this table from the manual, the zoom range of the lens allows for a flexible 10 feet 2 inches, to 20 feet 4 inch distance from a 100 inch screen.

Before ordering your screen, we suggest getting your hands on the projector first to test out the size you're considering with a temporary screen (aka bed sheet or wall), and the lighting conditions you intend to use it under. If you can't put up curtains, a brighter room may call for a less reflective (lower gain) screen to get the best picture.



We finally settled on a Da-Lite Cinema Contour 16:9 100-inch diagonal  wall mount screen. This screen has a gain of 1.3 (it will reflect 1.3 times more light than a standard white surface) and comes with a 3-inch wide matte black frame with permanent wall mount brackets.



It's important to keep eye height in mind when mounting a screen. Have a seat and measure how high your eyes are as you look straight ahead. 



Subtract 1/3 of the screen height from your eye height. That should be the height of the bottom of your screen. (Add the screen height to that to get the top of screen measurement.) [Update: Quick fix on the math photo. Thanks Dignan17]



Mounting the Da-Lite screen is simple. We used 2 inch drywall screws to mount the upper and lower brackets. Once the first screw is in, use a bubble level to level the screen mount. Thanks to our stud finder, we managed to secure the brackets to three separate studs.



The screen fits over the top bracket, is centered, then the bottom of the frame just pops over the lower bracket for a nice clean installation.



Since the room is about seventeen feet deep, we decided to mount the projector on a shelf. A ceiling mount was an option, but the shelf was easier and cheaper to install for this project. The shelf was leveled and centered on the back wall four inches lower than the top of the screen. The Panasonic can be located off center, but keeping the image centered in the lens will produce the best image. It's important to place the projector as parallel and level to the screen as possible.




Having attic or basement access to run your cables is a must if you want to hide you cables. Just remember that attic space in Texas gets seriously hot later in the day (as we found out). We pulled our cables from an access box near the equipment rack, through the attic, down to our freshly cut hole for the projector.



Once you have access into the wall and through the top or bottom of the stud wall, a wire snake is great for fishing access through the wall. For ease, we pulled a light nylon line through the wall and tied that to our bundle of cables to pull them through the wall down to the plate.



For the DVD player, we made a set of components; for the Satellite receiver, we purchased a 35 foot DVI to HDMI cable. Because the HDMI cable is so thick and lacks any method of securing the cable (dear HDMI designers: what the hell were you thinking?), we cut a new box hole directly behind the future location of the projectors HDMI port. We also pulled the power cable through the wall to the projector -- it's connected to a dedicated outlet installed in the attic.




We had problems getting a component cable in time for the install, so we tried making our own from shielded cat-5 and a set of RCA ends. It can be a challenge getting good solder type connectors, so we sacrificed a prebuilt cable to get a set of color coded, machine terminated connectors.



We used three pairs of the cat-5 for our component cables and left the shielding disconnected. Heat shrink tubing was used to insulate each connection as it was built, and the entire assembly was covered in heat shrink tubing to finish off each cable end. For ease, we finished the other end of the cable after we pulled it through the walls. The final cable performed just as well as our shorter cable, but we suspect a high end cable would provide slightly better video quality.





The adjustment joystick on the Panasonic could be smoother, but with the right touch, you can align the image pretty decently with it. The ring behind the lens zooms the image and rotating the lens itself focuses the image. We wish these controls were electronic, but once it's set, you can forget about it.



Once the projector is connected, powered and aimed, take the time to calibrate it a bit. The AVIA Guide to Home Theater on DVD is an excellent tool for calibrating the video your projector displays. It's a bit on the Mr. Rogers cheesy side, but it's loaded with test patterns and tones for tuning your setup. Some of it is specific to the older CRT systems, but with it you can calibrate your video to meet NTSC standards. The colored filters (Gels) are used for blocking out the other colors so the levels of red, green and blue can be adjusted individually. Even with the great ratings of the Panasonic AE900U we used, it was very helpful for calibrating contrast and just a bit of color level tweaking.




Finished up, and tweaked with AVIA, we're getting the popcorn and kickin back. It was a hit with everyone, even a uh, friendly scorpion (with claws and stinger) came by to check it out. We kid you not. Texas, man, Texas.

Source Link- http://www.engadget.com/2006/05/23/how-to-build-yourself-a-front-projection-home-theater/

Read more »


Streaming video game site OnLive collapses and restructures




NEW YORK (CNNMoney) -- Streaming video game service OnLive laid off most of its staff and sold itself to an unnamed buyer late Friday, in what appears to be a move to keep the service from going out of business.
It's a startling turn of events for the three-year-old On Live, whose ideas for on-demand video game content were once viewed as a possible future blueprint for the entire industry.
While OnLive did not file for bankruptcy, the wording of the company's announcement -- saying it had been acquired into "newly-formed company" and "backed by substantial funding" -- indicated that OnLive was struggling to stay in business as a stand-alone company.
The drama surrounding OnLive started Friday afternoon with a series of blog posts saying that the company had laid off its entire staff and shut down. OnLive's spokesman pushed back against the reports, saying "we don't respond to rumors, but of course not."
By the evening, though, it was clear something was afoot. IDG News reporter Martyn Williams staked out OnLive's Palo Alto, Calif., headquarters. "In the last 20 mins have seen three people walk out of OnLive with leaving boxes," Martyn tweeted.
He later posted photos of packed-up boxes in OnLive's parking garage. The images echoed those from 38 Studios, a gaming startup whose employees walked out of their offices in May when the Rhode Island company went bankrupt.
OnLive said late Friday that many of its assets have been acquired by a new owner, and that the company will transition to a "new form." It added that the new company plans to re-hire "a large percentage" of OnLive's laid-off staff, and that its services will continue uninterrupted for customers.
But OnLive's original vision may no longer be a fit for the fast-changing gaming field.
OnLive was revealed with great pomp and circumstance in 2009, promising to revolutionize the way publishers and players would produce and consume video game content. Instead of selling physical goods, like the retail juggernaught GameStop (GMEFortune 500), OnLive would run a copy of a publisher's title from a server at one of the company's datacenters. Then customers would pay a licensing fee to play an on-demand version of the game.
Streaming meant that publishers could patch their games instantly and could save on the packaging and sale of their goods. Several publishers jumped on the service, including well-known franchises such as Ubisoft's "Assassin's Creed," and Take-Two's "LA Noire" and "BioShock."
But the service struggled to keep up the momentum. Big, first-person shooters such as "Battlefield" and "Call of Duty" weren't available on OnLive because of concerns about the service's latency. Latency, or the time it takes for content to go from a datacenter to a customer's computer and back again, is critical for games where decisions are made in fractions of a second.
The company also struggled to find the right business model for its service. OnLive originally launched with a subscription fee, but abandoned it months later when it realized that gamers weren't willing to pay a monthly fee on top of paying full price for each game title.
As time went on, publishers began to set up their own, rival services.Electronic Arts (EA) created Origin; Ubisoft (UBSFF) launched U-Play; and Valve's Steam service became the dominant way to sell and distribute PC games.
"I think publishers saw OnLive and had memories of what the music industry did with MTV," says Robert Levitan, CEO of Pando Networks, a cloud content delivery network. "Why license out your content to a third-party distribution site when you can do it on your own?"
At the 2010 E3 video gaming convention, OnLive founder and CEO Steve Perlman admitted that streaming was still an evolving technology, but he felt the costs and latency issues would quickly diminish.
To Perlman's credit, streaming has come a long way since then. Netflix(NFLX) now does HD streaming, and casual games made by developers like Zynga are streamed to consumers' personal computers. Sony (SNE)purchased cloud-based gaming service Gaikai last month for $380 million, which some thought was a sign that OnLive would be bought as well.
Still, many in the industry think that the technology to afforadbly stream high-production titles isn't ready yet.
"OnLive may be the future, but the future is not here today," Levitan says.

Read more »

Tuesday, August 21, 2012

Keep it simple, make life better


How much can we remember?
There are only so many things that a human being can remember consciously. And all our rational decision-making capabilities are linked to what we consciously remember. It is this limited rational brain that marketers talk to most times through their 'logical' messaging system - 10 reasons why you should buy my product, five explanations why my product is better, three things to remember when you are comparing my service to my competitors. And so on…
When consumers were living simpler lives and buying fewer brands and products, they had the luxury of spending a lot more time listening to the logic of the marketer and evaluating why their washing powder was better than their competitor's. And hence why their sari was whiter than all the other white saris in town.
Can't handle the overload
Consumers' lives, and hence the marketing world, are not as simple anymore. The first crisis is just the sheer number of categories a person has to reckon with. Fifteen years back, most consumers did not have to think about things like mobile phone, internet, e-mail, broadband services, home security, DTH media, social networking, amongst many others. No denying that these made our lives better, but they have also taken memory space in our thinking brain.
Adding to the crisis of numbers is the crisis of choice. Too many brands to choose from. Too many pitches to listen to. Too many options to evaluate.
If we look around, it is evident that we have to engage ourselves with many new products and services that didn't exist 10-15 years ago. To the skeptic, the point is best made if she is asked to open her wallet and asked to count the number of cards she carries there.  The numbers of cards have a story to tell.
Thanks to all the brand conversations and the resulting information overload, the idea of consumer loyalty is dying. Consumers are fast becoming flirters, moving from one brand to another without much thinking. The brand is fast becoming a 'commodity'.  Consumers are buying into better products, not great brands.
Time for a marketing detox
In the world of great branding, less equals more. The gospel reads: Say less, say it well, build a connection and let the consumer be.
Great brands know the secret of simplicity. They know that all brands are essentially in one business - making life better - whether by solving a problem or by offering a new kind of living. And that's what they singularly focus on - tell us how they make our lives better, as simply as possible. Louis Vuitton tells you how your journey gets better. Harley shows you the road to living a life of freedom. Lufthansa tells you how much that moment of 'getting home' matters. Closer home, Fevicol tells you how it helps in joining things.
What is the bare minimum that needs to be said for it to make sense and be persuasive enough? This needs a fine balance.
The statue of David revealed itself once the artist chipped away the unnecessary stone around it.  Great brands will reveal themselves once their marketers learn to chip away the unnecessary.


Read more »