简体   繁体   中英

How to make Browser request java scripts whenever we open different releases of same webpage of ADF application?

Browser requests and cache java scripts when a web page is loaded for the first time and they could be out dated if you try to reopen the same webpage of an ADF application which runs with different release containing modified version of java scripts because browser doesn't seem to request again as they are cached. Does Oracle ADF provide mechanism to make sure browser requests for java scripts only if they are from different release ?

This is a valid concern, but should not be addressed from within ADF framework.

You may use Oracle Web Tier for controlling your cache expiration policies.

Bringing few more clarifications:

First of all: Oracle Web Tier is conveniently built on top of Apache Web Server. This is important because the knowledge base (docs, forums, blogs etc) on how to work with Apache is obviously larger and is easy to find expert advice.

What you are describing here is known as "Browser Cache Busting" where you need to 'force' the browser to clear static cache (css and javascript) after an website upgrade. The only way of doing it is to change the URL of the cached resource, but implementing this inside your application logic - although a common practice - is wrong design and bad separation of concerns. This should be controlled globally from your Web Server and not from your Web Application Server.

Provided you are fronting your Weblogic with an Oracle Web Tier (Apache), you can use mod_rewrite for controlling the caching of updated files .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM