Set Static Site Delivery Options

By default, Oracle Content Management uses a controller model to render site pages in a browser. You can enable site compilation on publish that will automatically generate HTML files for each page and deploy the resulting HTML files for static site delivery to improve site performance at runtime.

If your company uses compiled sites, you can control how long static sites are cached and what mobile user-agents call for adaptive mobile layouts supported by site compilation.

Enable Automatic Compilation on Publish

Oracle Content Management has a compilation service built-in to easily allow you to compile a site without any additional configuration. Or your service administrator may manually set up a compilation service for testing purposes to validate site compilation, or to use custom libraries. Regardless of the compilation service used, you can choose to compile a site when the site is published or republished.

  1. After logging in to Oracle Content Management, click Sites in the side navigation menu.

  2. Select the site you want to modify and click Properties.

  3. Click Static Delivery in the properties dialog.

  4. Enable Compile site after publish in the Enable Automatic Compilation section.

  5. When finished, click Done.

When you publish or republish a site with automatic compilation enabled, the publishing status is tracked and displayed on the site tile of the Sites page. After publishing is complete, the compiling process is tracked in the Static Delivery section of the site properties dialog. Once the compilation is complete, the site properties static delivery section lists the date and time of the last compilation and provides a link to download the compilation log.

Override Default Cache Control Headers for Compiled Sites

Compiled sites are cached on a user's browser for 300 seconds (5 minutes) by default. Your service administrator may change this default, but as a site developer, you can override the default for specific sites in the site properties.

  1. After logging in to Oracle Content Management, click Sites in the side navigation menu.

  2. Select the site you want to modify and click Properties.

  3. Click Static Delivery in the properties dialog.

  4. In the Caching Response Headers section, enter Cache-control: max-age= and then a numeric value for the number of seconds you want the page cached in a user's browser. For example, Cache-control: max-age=600 would cache the page for 10 minutes.

  5. When finished, click Done.

If your instance uses Akamai, to keep the existing Akamai settings, leave the Caching Response Headers section blank. To override the existing Akamai settings, enter Edge-Control: !no-store,max-age=1800,downstream-ttl=1800 where the bold items are the default settings in seconds.

  • !no-store indicates that this setting should override the corresponding Akamai caching configuration for the property.
  • max-age determines how long Akamai should cache this page. The default is 1800 seconds (30 minutes). During that time, Akamai will fulfill requests for the page without requesting the page from Oracle Content Management.
  • downstream-ttl tells Akamai to send a "Cache-Control: max-age" header with its response to client browsers, instructing those browsers to cache the page for the alotted time. The default is 1800 seconds (30 minutes).

Specify Mobile User-Agents to Support Compiled Adaptive Layouts

When compiling a site, mobile pages can be created to support adaptive layouts. You can specify the user-agents that will cause the server to deliver the mobile pages instead of the standard compiled pages for a site. The values entered here are treated as case-insensitive substrings when matching against the user-agent headers sent by browsers. Note that the keyword Mobile is commonly used in the user-agents strings for browsers on mobile devices.

  1. After logging in to Oracle Content Management, click Sites in the side navigation menu.
  2. Select the site you want to modify and click Properties.
  3. Click Static Delivery in the properties dialog.
  4. In the Mobile User-Agent section, enter a comma separated list of user-agent substrings for the user agents you want served mobile pages. If any part of the substring matches the browser's user-agent string, then the mobile pages are served.

Delete Static Files to Render a Site Dynamically During Compilation

The first time you compile a site, the site is rendered dynamically until compilation ends. Once compilation completes, static files are used to render the site.

If you publish a site with new data, the previous static files are used until new static files are compiled. This is useful if publishing a large site that takes a long time to compile.

If you would prefer your site to render dynamically during compilation, you need to delete the static files before you recompile.

  1. After logging in to Oracle Content Management, click Sites in the side navigation menu.

  2. Select the site you want to modify and click Properties.

  3. Click Static Delivery in the properties dialog.

  4. At the bottom of the tab, click Delete Static Files.

Existing static files are deleted and the site is rendered dynamically until the next time a site is compiled for static delivery.