
Take a load off your ORDS server and utilize Oracle's high-speed CDN to serve the APEX product static files for your instance. This has the dual effect of improving page load times and reducing the load on your ORDS server.
Using the Oracle CDN means you do not have to host Oracle APEX Static files on your ORDS Server. This makes APEX upgrades much faster.
Use the CDN for a Specific Application
Shared Components > User Interface Attributes > General > Static File Prefix

Note: When you set the CDN URL at the Application level, APEX will also look for 'Static Application Files' under this URL. In the example from the above screenshot, the substitution string #APP_FILES# will get changed to https://static.oracle.com/cdn/apex/21.2.4/. If you want to reference custom JS, CSS, or Image files, you cannot store them under 'Static Application Files'. You will need to host custom static files in object storage, a file server, or your CDN and provide references to the complete URL for each file. In the below screenshot, the first reference will not work, and the second will work:

Use the CDN for your Entire APEX Instance
To configure APEX to use the CDN URL for your entire APEX instance, run the following script from a schema that has the APEX_ADMINISTRATOR_ROLE database role.
begin
apex_instance_admin.set_parameter(
p_parameter => 'IMAGE_PREFIX',
p_value => 'https://static.oracle.com/cdn/apex/22.1.0/');
commit;
end;
Use the following to verify:
SELECT apex_instance_admin.get_parameter('IMAGE_PREFIX') FROM dual;
Just in case, here is the code to set static files back:
-- On-Premise Instance.
begin
apex_instance_admin.set_parameter
(p_parameter => 'IMAGE_PREFIX',
p_value => '/i/' );
commit;
end;
-- Autonomous example for APEX 22.1
-- Note: The value can change after Oracle applies patch sets 22.1.0, 22.1.1, etc.
begin
apex_instance_admin.set_parameter
(p_parameter => 'IMAGE_PREFIX',
p_value => '/i/22.1.1/' );
commit;
end;
Note: When you set the CDN URL at the Instance level, APEX will not look for 'Static Application Files' under this URL. This means you can add custom JS, CSS, or Image files in 'Static Application Files' as usual.
In the below screenshot, both references will work:

Remember!
- Whenever you upgrade or patch APEX, you need to check if the CDN URL has changed and update it for each application or instance as appropriate.
- In the unlikely event that your organization does not allow any outbound connections, then using an external CDN will not work for you.
Getting the Right CDN URL
As you can imagine, the CDN URL changes for each version of APEX and sometimes for each patch set bundle. You can get the correct URL for your version and patch set from the 'Known Issues' section of the APEX Download page for your version.
Example for APEX 21.2

Performance Test
I created a blank, public APEX page with no components on it. The page was developed on an OCI Autonomous Free Tier Instance. I then disabled the browser cache using Chrome Developer tools (see screenshot below). Disabling the cache ensured that all static files were fetched from the server for every page refresh.
I refreshed the page 15 times using the Oracle APEX CDN and 15 times without the CDN. A total of 15 static files were fetched for each page load. I averaged the value of the 'Finish' value in Chrome Developer tools (see screenshot above).
The page loaded 11% faster on average using the CDN.
Credits
- Credit to the 'one and only' Joel Kallman's post announcing the availability of the Oracle APEX CDN.
- Credit to Jason Straub's Post on Running Customer Managed ORDS on Autonomous Database
🔗 Read More
- 🩳 APEX Shorts
- #️⃣ APEX Posts
About the author
- I’m Jon Dixon, an Oracle APEX developer and consultant at Cloud Nueva. I write about APEX, ORDS, the Oracle Database, and how AI is changing the way we build software. This blog is where I share practical examples, lessons learned, and ideas from my work.
Comments
Join the discussionHi John, We have Nginx as reverse proxy and we have configured a cache for static files, where it is supposed to be cached by the browser for a long period:
location /i/ {
expires 300d;
rewrite ^/i(/.*)$ $1 break;
root /u01/software/apex/images;
}
The users of the Apex apps are located in several countries in different continents.
Do you think if we activate CDN, we should remove this? Or it will be complementary?
Thanks for your great posts! Jose.
Hi John, Great post. Thank you for sharing.
I can see in APEX 22.1.1 that there are now 2 different paths.
One for APEX Files and one for APP Files.

This simplify the use of CDN for custom files JS/CSS/Etc... We don't need to specify the full path URLs everywhere, we can keep using #APP_FILES#
(I haven't tested yet)
Great one John






