My Oracle Support Banner

Custom JavaScripts From WebCenter Portal FrameWork Application Cannot be Cached by OHS Directives Because of Incorrect or Missing Content-Type in HTTP Response Headers. (Doc ID 1614674.1)

Last updated on MAY 23, 2024

Applies to:

Oracle WebCenter Portal - Version to [Release 11g]
Information in this document applies to any platform.


From JDeveloper, create a  WebCenter Portal FrameWork Application.  In the same location where index.html is, create a custom javascript file (.js).

Access the javascript from browser:  e.g. http://<HOST>:<PORT>/<app_contaxt>/javascript_name.js

Use HTTP IE Headers or Live Headers (or equivalent) to look at the response http headers in the  browser.

Notice that the content-type is not there.

If the application is front-ended by Oracle HTTP Server (OHS),  access to the javascript via OHS will show the response as

content-type is text/plain   instead if   application/x-javascript

As a result, the javascript cannot be cached using OHS directives (e.g.) :

   ExpiresActive On
   ExpiresByType  application/x-javascript "access plus 1 minute"


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.