Web server configuration for the Web SDK JavaScript

To configure the Web server where the Tealeaf Web SDK JavaScript file will be deployed, you define settings for compression and caching.

Compression

For optimal performance, compress the Tealeaf JavaScript on your web server.

  • Configure the webserver to perform compression encoding of the response data before it is sent back to the browser, which decompresses it for use on the client.
  • Apply compression encoding to static text content, including the Tealeaf JavaScript file.

Note: Since this behavior is negotiated between server and client, an HTTP 1.1-compliant web server must not use any compression encoding unless the client indicated support of it by a Request Header (Accept-Encoding).

This form of compression further reduces the file sizes of minified Tealeaf JavaScript by approximately 75% before delivery to the client.

Browser caching

For browser caching configuration, follow these guidelines.

  • Set the TTL values for the Expires or Cache-Control headers for the Tealeaf JavaScript to the same value as the rest of the scripts that are stored on the web server.
  • Take advantage of the conditional GET feature of HTTP 1.1 by configuring your web server to set the appropriate ETag or Last-Modified headers. When this feature is enabled, any change to the JavaScript resources is automatically propagated to the visitor's cache.

For more information, see these industry resources:

IIS configuration

On Windows Server 2003, put the Tealeaf Web SDK files in a directory with the other JavaScript file to comply with the "Script source access" setting in the configuration.

For more information about configuring IIS, see http://support.microsoft.com/default.aspx?scid=kb;en-us;313075

Non-IIS web server configuration

For a non-IIS server, a dynamic web page must be created to accept the POST from the Tealeaf Web SDK JavaScript. The contents of the web page vary based on the deployed technology.

The contents of the returned Web SDK JavaScript POST requests are irrelevant. To minimize bandwidth, minimize the return contents.