Optimizing General Site Pages

General site pages are any pages on your site that are not initial access points for customers.

Use Progressive Rendering

By controlling the order in which components of a page load, you can give the impression of a faster loading page. Instant feedback from a partially rendered page or a progress bar makes the page feel faster to the customer, rather than a blank page that isn't yet loaded, even if the total loading time for the blank page is shorter than the incrementally loaded page.

Use the following general guidelines:

Limit Domains

Each domain included on a page costs DNS resolution time. Many pages might incorporate Scene7, Akamai, Salesforce B2C Commerce, Google (for Analytics), Verisign, Trusted Dudes, or Omniture. Each domain requires a DNS lookup, which might take from 20 to 120 milliseconds.

The standard recommendation for browsers is no more than two downloads per domain. In some cases it makes sense to split data across domains to use concurrent downloads. However, each domain requires a DNS lookup that takes additional time.

B2C Commerce offers hosting of static content via its embedded CDN, and enables that by default.

Avoid 301 and 302 Redirects

Avoid 301 (permanent) and 302 (temporary) redirects. This is a wasted HTTP request and might prevent caching. Temporary redirects are not cached, so the request is always issued. Permanent redirects change the behavior of search engines and therefore are usually cached.

Keep Pages Maintainable

As with any optimization process, there are always trade-offs. While consolidating code and removing comments can make pages faster to load, it makes them more difficult to maintain. In some cases it might make sense to sacrifice performance to make the site easier to maintain or extend.

Use Compression

B2C Commerce GZIPs all page components. This is standard for all B2C Commerce production environments. All data delivered to the HTTP client is gzipped, with the exclusion of images and data for some older browsers.

Minimize Image Size

The image file format you use depends on the type of image (photographs vs. graphics), the size of the image, and how the image is composed (transparency or large blocks of color). In selecting or compressing your image formats, the goal is to make them as small as possible.

File Type Recommended For
gif Most graphics. gif files have higher compression rates than GIF and support true colors and alpha-transparency.
GIF Graphics that have large blocks of color. Also recommended for graphics that require transparency that must be shown in Internet Explorer 6. Internet Explorer 6 doesn't allow transparency for gif files. While there are tweaks for this, the tweaks can cause additional performance overhead.
gif Photographs.

Many graphics or web publishing tools add information (EXIF-information) to graphics files to make it easier for them to store and sort them. However, this makes the files larger than they would otherwise be. You can use tools to strip any additional information included in the image by the digital camera or the image processing software. This makes the image smaller.

Reduce and Reuse CSS

B2C Commerce has the following recommendations for optimizing CSS use in your browser:

Use a Content Delivery Network

Content delivery networks serve content to a browser from a server that is geographically near to them. This can substantially reduce the time to load pages. An embedded CDN comes standard with B2C Commerce. Salesforce recommends that you host as much content as possible, especially CSS and JavaScript, with a content delivery network.

Note: There might be cross-domain scripting issues for JavaScript or Flash due to the embedded CDN security model.

If you set a time to live (TTL) for static content in Business Manager, this is carried over to the embedded CDN or other content delivery networks.

Related Links

Tools for Improving Site Performance

Techniques for Improving Site Performance

Testing Site Performance

Optimizing First Pages

Make Fewer Smaller HTTP Requests

Reduce and Reuse Scripts

Reduce URL and Page Size

404 Errors and 404 Pages

Performance and Stability Coding Standards

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.