To Slice or Not to Slice?

 < Day Day Up > 



Before beginning to slice your images, you need to understand why it needs to be sliced, or whether it needs to be sliced at all. Many people mistakenly believe that slicing increases loading speeds. This usually isn't so; in most cases, the page actually takes longer to load because there are more hits to the server since every slice is being requested from the server. Slicing does make the page "appear" to load faster, because the user can see parts of the image before the whole thing loads.

Many reasons exist to slice an image:

  • If an image is over 20K, it needs to be sliced to form the perception that it's loading faster.

  • If you need to export some slices as JPEGs and some as GIFs, or GIF animations within the same image, slicing is the best way to go; that way some of the slices can be a different format to suit your needs.

  • If you want to attach behaviors, such as rollovers, to an area, it has to be a slice or hotspot object.

  • Slices help the loading of your Web pages when you have a logo or other repeating elements in the Web site if you place the same slice on every page using the repeating element.

Note 

When you have a logo or element that is repeated often within your site, be sure that the element or slice is linked to the same image file. That way, after the server retrieves it one time, it is in the browser's cache. If you use the same image and put it in different folders, the server has to fetch it each time.

Another wonderful advantage of slices is that if you need to update one section or slice, you don't have to redo the whole image. For instance, suppose you have a complicated sliced image that you have optimized, sliced, exported, and incorporated into every page on a large site. You then discover that one of the major slices contains a misspelled word. You can simply fix a copy of the one sliced image, optimize it, export it, and upload it to replace the image with the error.



 < Day Day Up > 



Macromedia Studio MX Bible
Macromedia Studio MX Bible
ISBN: 0764525239
EAN: 2147483647
Year: 2003
Pages: 491

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net