15 tips on how to save bandwidth (ZT)


来源: 其他网站

15 tips on how to save bandwidth  (ZT)


These tips are for those people that do have a bandwidth limit on their weblog or website.

  1. Try to avoid images: Use HTML and CSS instead
    Images are very bandwith consuming. Instead of using a background image, use the CSS code. For example, don't use black.jpg as your background, just use color:#000000.
  2. Compress images: Use JPG and PNG
    If you're using
    Photoshop, use the Save for Web & Devices (Alt+Shift+Ctrl+S) option to optimize it for minimum bandwidth. When you have an image with lots of colours, you should go for JPEG. Play around with the quality to change the filesize. Else, I would go for PNG (or GIF). Under no surcomstances, use BMP.
     
  3. Disable file hotlinks
    Sometimes other websites don't host images / files on their own host. Instead of that, they hotlink an image / file that is hosted on your site on theirs. This form is on the web known as
    bandwidth theft. If you want to make sure that people don't steal your bandwidth, check out altlab.com for a nice tutorial using the .htaccess file.
  4. Compress your CSS
    CSS files can be pretty big, with lots of useless breaks and spaces. Use the CSS Compressor from arantius.com or isnoop.net to trim down the filesize of your CSS.
  5. Compress your HTML with GZip
    Just like the CSS, your HTML can contain a lot of whitespaces and useless breaks. If you have a
    PHP website, try the GZIP compression. This will trim-down your filesize big time. How to implement and enable GZIP, check the tutorial on techiecorner.com.
  6. Don't use HTML comments
    This is a little bit agains my article about
    making comments in your source code, but it can help you a little bit saving bandwidth. Leaving comments out of your source code, the less filesize you transfer and thus you save more bandwidth.
  7. If a DIV or SPAN can do the job, avoid using TABLE
    Using a TABLE is already a "no go" these days and it's format is pretty big. If a DIV or SPAN can do the job (with a little bit of CSS help), you'll surely transfer less data.
  8. Trim down filenames and locations
    Pretty simple technique, saving you bandwidth. Change the folder and filenames to a smaller word / character, like this:
    Original:
    /images/stories/subfolder_1/subfolder_2/subfolder_3/this_is_my_image.jpg
    Formatted to save bandwidth:
    /img/001.jpg
    Managing these files is hard (since you don't know by looking at the filename what it exactly contains), but you'll have less characters (data) in your file.
  9. Specify your ALT and TITLE
    This is for your A and IMG tags in your HTML code. Make your ALT and TITLE brief and as short as possible.  
    When your image isn't displaying anything, but is just used for the layout, leave the ALT attribute empty.
  10. Use hosting sites for files
    If you want to share (big) files and not let your bandwidth effect by it, host the file on hosting sites such as
    RapidShare and MegaUpload. Host the file and place the download link on your own blog or website.
  11. Use external sources to cache your RSS Feed
    You can cache your RSS Feed to save bandwidth. Sign up at
    RSS Cache and see how it works.
  12. Don't submit your website to search engines
    Searchbots from searchengines such as
    Google act just like a returning visitor: They crawl your website, causing it for you to lose bandwidth. Do not add your URL to an searchengine. If you want your website to be found, but don't want to waste your bandwidth on the bot, there are several webmaster tools that will slow down the crawling speed of the bots.
  13. Make your website / blog "Members only"
    When you create a login-module on your website and restrict your page-viewing to registered member only, it'll help you save bandwidth too. When only those certain people can view pages, you'll surely have less visitors that consume your bandwidth.
  14. Use AJAX
    AJAX (Asynchronous JavaScript and XML) was created to take down bandwidth. When you master this, you'll be able to save a lot of bandwidth since visitors don't have to re-load the full page. Instead of that, they reload the part of the page they need to refresh.
  15. Ultimate tip: Don't spread the word
    Pretty stupid tip, but it's the best one to save bandwidth: Don't spread the word of your website. If nobody knows that it exist, the only one that is consuming the bandwidth will be you.

Overall note:
If you want to make a big website or blog, don't cut out on the webhost. Just spend a little more money getting a better host. When you have a good running website, you'll earn it back eventually. Big time.




Do you have any more bandwidth saving techniques that aren't on this list?













登录后才可评论.