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 MARCH 08, 2017

Applies to:

Oracle WebCenter Portal - Version 11.1.1.7.1 and later
Information in this document applies to any platform.

Symptoms


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://machine: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"

Cause

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
Symptoms
Cause
Solution


This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.