Discussions
Categories
- 196.7K All Categories
- 2.2K Data
- 235 Big Data Appliance
- 1.9K Data Science
- 449.8K Databases
- 221.6K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 549 MySQL Community Space
- 477 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 532 SQLcl
- 4K SQL Developer Data Modeler
- 186.8K SQL & PL/SQL
- 21.3K SQL Developer
- 295.4K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.1K Development Tools
- 104 DevOps
- 3.1K QA/Testing
- 645.9K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 153 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 158 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 203 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 394 LiveLabs
- 37 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.6K Other Languages
- 2.3K Chinese
- 170 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 230 Portuguese
When sharing images in APEX, the suggested options if not via static application/workspace files?

As the subject, what are the options for better performance for sharing the images in APEX?
Best Answer
-
I prefer use HTTPD or Nginx to share static content.
If you like use APEX application and/or workspace files, then you could use HTTPD or Nginx front of ORDS to cache those files. Below blog posts might help on that
Answers
-
I prefer use HTTPD or Nginx to share static content.
If you like use APEX application and/or workspace files, then you could use HTTPD or Nginx front of ORDS to cache those files. Below blog posts might help on that
-
Thanks for the suggestion, Jariola, and sorry not to clarify our scenario clear enough, we are using on-premise installation, and want to provide the images to our clients within the APEX application, why we are asking this question is in order to avoid network traffic bottleneck when sharing these images, is it possible to host these images in another place for faster access speed?
-
Basically you can host files anywhere you like. Problem might be how you then reference those in your application. If files are in different web server, you need reference those with absolute URL.
Could you provide bit more information where in application you show those images or are those something that users downloads?
-
Also it's important you set correctly HTTP headers that clients can cache files. E.g. Cache-Control header.
E.g. APEX 20.2 did have bug that Cache-Control header wasn't set correctly for workspace and application files. It is fixed in latest PSE.
-
Thanks, and what will happen when the Cache-Control header wasn't set correctly? the client browser will not do the cache?
-
Mostly the images are used in the Card region, other files are PDFs, but PDF files are not often accessed.
-
In most cases then client do not cache file and file is fetches again in every page view.
If talking about workspace and application files, then it's of course fetch file from database and consumes also resources there.
-
Region cache don't cache referenced files, like images. It caches mainly HTML region outputs.
-
Got it, so it means the cache will not help in this use case, right?
And we should survey a good image hosting service instead?
what image hosting service do you think is suitable for APEX?
-
Region cache is good when you have e.g. long running query to produce region content, but data isn't change often. APEX caches region HTML in server side so it don't need run query and generate HTLM in every page view. That don't cache or affect referenced files like images.
I would first check that images you serving have proper cache headers for clients. Then if you use workspace and/or application files, try cache those in web server, so that if client forces fetch image again even cache headers, request not hit database and web server returns it from cache.
Or move your files to web server from workspace/application files.
I don't have any recommendations for image hosting, sorry.