Saturday, December 7, 2013

Speed up your web site.

Most of the tips are the ones that you probably know. So, you can use the list as a checklist (which it normally is in my "customer notes sheet" : ) ).
Here are the tips:

1. Get A Fast & Less-Loaded Web Server

This is a must. Whatever you do to make your website faster, if it is served slow, there's nothing to do.
Make sure that the server your website is hosted has low ping values & it is not over-loaded. Specially if you've a database and/or using dynamic files (like asp, asp.net, php, ruby..) server over-load can kill the performance.
If you've a simple website with few visitors then shared hosting is ok. For a website getting popular, think of a VPS with guaranteed RAM & CPU usage. If the website is already popular, a dedicated server will be the best performing one.

2. Know When To Use GIF, JPG & PNG Files. 

Playing with the quality of images will dramatically lower the sizes of them while they will still be looking good.
GIF is suitable for images with few colors like logos, text & line art. When saving a GIF file, make sure you use a small color pallette (learn more).
JPG is good for images with lots of colors & details like photographs. Decrease the quality of a JPG image before saving. It will still look good for a web image (learn more).
PNG, a format specially for websites, has great quality – both transparent & non-transparent – is specially functional when you're in need of quality transparent images. Don't forget that IE6 has problems in displaying them (learn more).

3. Use XHTML – No Tables

This is easy to tell but may be harder to implement for anyone that has few experience with XHTML.
The thing is, tables are rendered slower than DIVs by browsers. You can do more with less code & no need to say it is much better to be compatible with any browser (including mobile browsers), in means of SEO, etc..
Update: There may be cases when using tables are much more logical like "tabular data". You may have to code a lot for creating the look of a simple 5 columned table. Don't do that & use tables when needed.
What is tried to be mentioned here is, use XHTML rather than tables in general. But don't try to draw images with XHTML.

4. Use CSS Smartly & Compressed

  • Mention every style in CSS files.
  • Find the common properties in objects, define them once & try not to repeat them.
  • If using a significant amount of totally different properties for a specific page, define them in another CSS file & only include on that page. So users viewing other pages won't need to download those properties.
  • Compress your CSS file (you may try thisthis or this).

5. Merge & Compress JavaScript Files

Try merging JavaScript files prevent multiple includes (see step 6).
If a JavaScript file will be used only in few pages, try to include them inside those pages only (like CSS in step 4).
Compress JavaScript files. It lowers the size seriously & doesn't have any bad effects on your side. This & this are some of the popular compressors.

6. Manage Included Files Better

There may be several files included in webpages like CSS files, JavaScript files and other JavaScript files for statistic services, social bookmarking sites, widgets & more.
Try to decrease the number of these files:
  • If using digg-reddit-like voting widgets, don't use them in stories that won't hit the frontpage & remove the ones that were submitted few days ago as they won't have any help after sometime.
  • Use only 1 statistic service if possible. Every web-based service requires new files to be installed & they are called each time a page is loaded.
  • Host files on your side & don't use web addresses as file paths.
    • If you're using any JS frameworks like jQuery or MooTools, don't call the .js files from their websites but download & upload them to your website.
    • Don't try to call any file from a web address like "http://.." as this always requires dns queries to be done & will work slower.
  • PHP Speedy (WRD post)is a very effective solution that does all the combining & compressing automatically. You may want to try it.

7. Use HTTP Compression

HTTP compression is one of the most effective step with a little effort.
Today, almost every browser & web server supports HTTP compression. Using it, your files are sent to the visitor compressed & un-compressed on their side & you can have up to 90% success for the text based files (like HTML).
You have 2 popular choices with this:

8. Better Coding

This is for websites which does not use any ready-to-use systems like WordPress, Drupal, ExpressionEngine or similar (if you're using these then you're lucky as they are already well-coded).
Besides the better XHTML & CSS coding, the dynamic coding of the website directly effects the performance.
As you can guess, this is a huge subject. But there are some major things like:
  • Seperate the static & dynamic content. This will help writing less-code.
  • Create smart & effective functionsFor ex: if you're going to use a user's name & birthdate at the same page, don't run 2 queries or functions, your function must call 2 of them. Simply, try to do everything once.
  • Connect to the database as few as you can & once connected, call only the data you need.
  • Try to keep database sizes small. If you've a large database, sometimes seperating it into several databases perform better, specially for the data which is reached not so often. From the server's point of view: 4-250mbs of dbs perform better than 1-1gb of db.

9. Cache Webpages

Caching is a superb way of decreasing the stress on the server by running more static files & less queries. It simply saves a static, HTML version of the page to be displayed & displays that file rather than the dynamic one.
For CMS applications like WordPress, there are already ready-to-use caching plugins (like WP-Cache). For PHP, here is a great article from SitePoint.
A small note, caching can also be done at the web server level. But if you're on a shared hosting account, you better be lucky to have it on.

What Do You Suggest?


Besides the tips mentioned above, what are your tips to make websites faster?

Saturday, September 14, 2013

How Can We Minimize the Failure Rate of RFID?

What factors lead to such failure, and how can they be minimized

It depends on what you mean by "failure rate." That phrase could refer to the percentage of time that RFID readers fail to capture data from a tag, or the percentage of applications that fail to deliver business benefits. Each type of failure is different, and the explanation of how to reduce the failure rate is complex.
I will focus my answer on the inability to capture tag data. There are many potential reasons that this could occur, which might differ depending on the type of RFID system you deploy. With an active system, failure to read tags is rarely an issue since the tags broadcast their own signal. Evidence of this reliability can be found in toll-collection systems, such as E-ZPass (see RFID News Roundup: E-ZPass Celebrates 20th Anniversary). No transportation agency would use active RFID for automated toll collection if the technology could only read tags 90 percent—or even 99 percent—of the time. These systems need to be nearly perfect, which they are.
Failure to read tags is a passive RFID issue, and often a passive ultrahigh-frequency (UHF) issue, since high-frequency (HF) and low-frequency (LF) solutions have a shorter read range and utilize a different means of tag-reader communication. Listed below are some common issues that prevent tags from being read consistently.
Incorrect tag orientation: Some tags are designed to be read regardless of orientation, and some reader antennas (those that are circular-polarized) are built to read tags in any orientation. But if you are using a dipole UHF tag and a linear-polarized antenna, for example, and if a tag is improperly oriented, it will not capture sufficient energy from the reader.
Electromagnetic interference: "Noise," or electromagnetic interference from other RF devices, as well as factory machines or fluorescent lights, can either block waves from getting to the tag (if they are employing the same frequency) or corrupt transmission.
Absorption of RF energy: Materials that contain a large amount of water absorb RF energy at the frequency used by passive UHF RFID systems. The energy absorbed is unavailable for use by the tag, which will fail to receive enough energy to reflect back a strong signal to an interrogator. In addition to water, other dense materials can prevent RF energy from reaching the tag as well.
Reflection of RF energy: Metal can reflect energy away from a tag, or reflect the tag's signal away from a reader antenna, thereby preventing normal tag-to-reader communication. If energy bounces off a floor, a ceiling, metal shelving or other materials, it can cancel out waves and cause null spots in the read field. Tags located within any such dead zones will not be read.
Detuning the tag antenna: Antennas on a UHF RFID tag have been tuned to receive signals within the UHF spectrum. If a tag is placed on or very close to metal, its antenna will become detuned and it will no longer receive a signal. This is similar to touching a radio antenna with a piece of metal—the channel being clearly received suddenly becomes static since the radio can no longer receive the signal.
Shadowing: If tags are lined up one behind another, the first tag captures the reader's energy, but the tags behind it do not. This effect is sometimes called shadowing.
All of these issues can usually be overcome with good system design.

—Mark Roberti, Founder and Editor, RFID Journal