images

Ten Tips On Saving Bandwidth


Saving bandwidth on your website is one ideal way to reduce the bills you need to pay. Like many shared hosting companies, you may have “unlimited” bandwidth and it may not be a huge factor to you, but what should be is your site’s reliability, uptime, and performance. If you’re receiving too many visitors, they can potentially shut down your website for all the content they are downloading off your server.

If your website is slow, it’s most likely the case that your website is too large. Here are our tips on how to save bandwidth without doing all too much! 

  • Images are bloated; make sure they’re optimized! It’s clear that images take up a major part of any modern website, but the question is, what can you really do? The only thing you can do is make sure they’re optimized! Too keep it simple, make sure to use the functionality of Photoshop’s “Save for Web” features. Using Photohop’s web features, you’re able to create images that are optimized and not too large to download. If you want more information on image optimization, we have a whole post written on just this! Vist our image optimization post for more details. Also, you should use sprite maps, which are simply images stuck together, on your website. To do this, take a look at this article on CSS-Tricks and SpriteMe.
  • Pay attention to how much code you use! This is one obvious fact, but the more code you use for your website, the longer it’ll take to download and the bigger it’ll be. When writing HTML, try to keep it in an orderly format without using too much code. You can use services like HTMLTidy to compress your HTML documents. Just like HTML, you can also compress your CSS files also using services like Clean CSS. CSS and HTML comments will also add bloat, so try to use them sparingly in a production website. There are plugins for WordPress you can use, like W3 Total Cache, to compress your source code files entirely.
  • Take advantage of GZIP compression! Not only can you compress your source code into some hard-to-read file, your server can also compress your files using GZIP automatically. GZIP will compress your files delivered to your users, if their browser supports it (all modern browsers do), and will be uncompressed once they receive the file. To enable GZIP, take a look at the Apache module “deflate” or the GZIP module available in Nginx.
  • People might steal your bandwidth! When people are linking to your images on your server, they are “stealing” your bandwidth via hotlinking, or linking to your content on a different server directly. This could become expensive in case the file is placed on a popular site. Luckily, you can disable this easily and save bandwidth if it’s happening to you!
  • Use CSS styling as much as you can! CSS has been given to you for one reason, to style websites without images! CSS does one amazing job and with CSS3, you can achieve more like rounded corners and shadows without using any images. If you can do it using CSS, go for it.
  • Tables are so Web 1.0; use <DIV>/<SPAN>/CSS to style your website! That’s right web developers! Don’t be lazy and use those tables! You should rather turn divs and spans into a styled table instead of using the table attribute in HTML. The table attribute is too old and takes too much code to manage; using divs and spans will reduce the size of your HTML file.
  • Repeated images are not old school! Even though repeated images can be associated with those old websites back in the early days of the internet, let’s not think of that. Instead, when you are designing your website, design it in a way that if you have any type of repeating pattering, save it as a tiny image and let CSS repeat the image for you.
  • Take advantage of CDNs! One easy-to-achieve way of saving bandwidth is to direct your files elsewhere, or in this case, a CDN like us :) . Not only will a CDN speed up your website, it will also save you bandwidth as it’s directing the content elsewhere.
  • Search engines will crawl on you! Search engines, especially Google, will crawl your sites like bandwidth is never ending. You can use Google Webmaster Tools to reduce how often they will go through your website.
  • AJAX is there to help! AJAX was made for one reason, loading content dynamically without refreshing your browser. Because of this, durring that refresh, a good portion of your site content is left unchanged. You could implement AJAX so when a user clicks on a link, it’ll only load the needed content. If the theme of your website is constant, AJAX is one possibility for you. Besides, you could add in some fancy transitions too and your users will love you for having them! Think of Twitter or Facebook as they both rely on AJAX quite a bit.

 

We hope our bandwidth saving tips will help to speed up your website and reduce those bills!

How To: Optimizing Your Web Images

As the Internet is continuing to get pretty with all kinds and gradients and images, it is increasing the size of images used in many websites dramatically. Even though there are many technologies like CSS3′s gradient capabilities to help you use fewer images, you won’t see any significant differences until you start optimizing your images.

Even though there aren’t too many ways to optimize your images, there are many techniques used in Photoshop to optimize your images. For this test, we’ll be spending the majority of our time in Photoshop.

 

File Format Differences

 

Let’s face it, there are so many ways to save your images in Photoshop. But if you’ve been using the “Save As” feature in Photoshop to save your web images, you should know you’re already saving a very unoptimized file.

As most people are already aware of the PNG, JPEG, and GIF file formats, let’s point out the differences. Keep in mind that the JPEG format will typically always have a lower file size, but the quality of the file is sporadic depending on the file.

JPEG wins hands down in terms of file size for a normal photo. At 30% quality, JPEG seems to have the highest lead (in terms of image compression/file size), but in order to exaggerate one downfall of the JPEG format, images are very distorted. The JPEG file format has some quality issues at a lower quality percentage. If we create the same image at 60%, quality is increased by a ton, but the issues are still visible. Even the JPEG format at 100% is not the highest file size and looks crystal clear.

After the JPEG format, you can see one of the leading file formats on the web, PNG-8 (which means it’ll pick from a maximum of 256 colors), coming right after. Because it is much larger than the JPEG format, it also has one downfall, there are many visible “dots” on the image.

The GIF format is very much like PNG, but is less optimized when using very large images like the one we’re testing. It suffers from the same issues that PNG does.

Our last two images, the PNG-24 files, are much like the JPEG format at 100% quality, but with supporting transparency. Keep in mind that the JPEG format does not support transparency, and because of this, JPEG images are not used as the main theme files of many websites.

 

So what… what should we use?

In actuality, there’s no easy rule to decide which format every image should be saved as. Every image format has its issues but with those issues, we can narrow them down on which type of files should be used for what. Most of this is truly up to you and what you think is best. We can’t tell you which one is the best, but what we can do is guide you in the right direction in picking the best file format.

But please keep in mind, the one with the lowest file size isn’t always the best image format.

  • If you want the highest quality, use a JPEG at around 80% quality or a PNG-24. These will be fairly large file sizes, but there are some cases where a PNG-24 image (even with transparency) has a lower file size than a JPEG at 100% quality. You simply need to compare the two formats.
  • JPEGs are best used with pictures taken by a camera, as they contain many colors that the JPEG format excels at compressing.
  • If you are using minimum colors, compare the GIF and PNG-8 image formats. They are very similar, but it seems that GIF is great with small images and PNG-8 is great with lots of colors at a small size. Again, you need to experiment and compare.
  • If you need any kind of transparency, PNG-24 has the best compatibility. The edges of the image are very smooth, unlike GIF and PNG-8, but most of the time, the file size will be raised by quite a bit; use sparingly.

When in doubt, rate every image format on the basis of file size and quality. After that, you should have the best image format for the image you are working on.

 

Seriously, this is a lot of work! Any easier method?

If you’re using WordPress for your website, there is a handy plug-in called WP Smush.it that will do all of this hard work for you.

Essentially, it’ll take all of the unneeded data in JPG files that your camera stores, optimizing the compression of a JPEG file, converting some GIFs to PNGs to save some space, and remove some unneeded colors from GIFs or PNGs.

No matter what way you use to optimize your files, it is needed. You want your website to load quickly, users want to see a fast website, and search engines will rank your website higher as your site is loading faster.

Images slow a website down more than anything else and there are many ways to make sure your website will load faster, but image optimization is key to a fast loading website.

 

Anything Else?

Please keep in mind that because images are fairly large, the download time is very much tied to how fast your server can handle requests and the time taken to transmit a file to the requested user. As you have many things loading on a typical website, like JavaScript, HTML, images, and more, all of these HTTP requests will slow down the server at some point.

One excellent way to stop this from happening is by hosting your main files, like your images and JavaScript files, somewhere else. This is one example of how our CDN services can speed up your website, the other reason being that we have a high class network and state of the art servers with Enterprise SSD drives that will serve your files in the fastest way possible to your users.

If you are willing to combine all your images together, typically your theme images used for your website, you can create a CSS spritemap and the user can download your images used on your website with only one HTTP request! CSS spritemaps are fairly simple, and there are even tools that can help you with the process; they’re something every web-designer should look into.

If you have never optimized any of your images, it may be a good time to take a look at what is slowing down your website.

 Scroll to top