Some test text!

Optimizing WebViewer assets

When loading WebViewer on an HTML page a number of JavaScript, CSS and other files need to be downloaded. If files are concatenated together and minified where appropriate then this can reduce the number of HTTP requests and bandwidth needed to download all of the WebViewer assets.

We've provided a gulpfile that can optionally be run to optimize this process.

  1. Open terminal and navigate to WebViewer/lib/ui-legacy
  2. Run npm install
  3. Install gulp globally by running npm install -g gulp
  4. Run the command gulp. After this has completed there will be a lib/ui-legacy-min folder.
  5. Add the option html5Path: "ui-legacy-min/ReaderControl.html" and html5MobilePath: "ui-legacy-min/MobileReaderControl.html" to your WebViewer options.
If you make customizations to files like ReaderControl.js then you'll have to rerun the gulp command after each time you make changes.