Why My Cloud Pak Web UI is So Slow

Caching and Non-trusted Certificate

Zhimin Wen
5 min readNov 15, 2023
Image by Franck Barske from Pixabay

I have API Connect installed on OpenShift with Cloud Pak for Integration. Each time when open a UI, it is taking minutes to get the page fully rendered. Why?

Take the example of Cloud Manager Web Console, total about 70+ MB files (javacript and other static files) need to be downloaded. For each refresh, all these files are downloaded again. There seems no caching of these static files at all.

It turns out Chromium based browser will not cache any static content when the HTTPS traffic is not secured, this includes self-signed certificate or mis-configured certificate. Check out this link,

https://bugs.chromium.org/p/chromium/issues/detail?id=110649#c8

Let’s have a quick experiment with it

A Quick HTTPS File Server for Testing

Create our own CA cert and certificate with the cfssl tool in the directory of certs

Run a testing HTTPS server with Golang magefile

func (Https) T01_serve() {
fileServerHandler := http.FileServer(http.Dir("static"))
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
reqDump, _ := httputil.DumpRequest(r, false)
log.Printf("%s", reqDump)…

--

--