, 1 min read

Clear Cache in Brave for Android

Problem statement: How to clear the cache in the Brave browser on Android.

The Brave browser attracted some interest as it provides protection against malware, and blocks annoying ads, like flickering images, popups, which want you to download shady and harmful software. You can download the Brave browser in the Google playstore.

  1. Short story
  2. Long story

Clearing the cache in the desktop version of Brave is easy: Go to the settings menu, then search for "clear cache". Done.

1. Short story

On Android the settings menu for Brave does not offer any method to clear the cache. Instead, use the App info to clear the cache.

Long press on the Brave icon.

Press on the encircled i.

Press "Clear data".

Finally, press "Clear cache".

2. Long story

The above short story solves the problem. However, it does not tell, why this might be necessary.

In a particular case for me I had the need to clear the cache, when I upgraded Pagefind 1.3 to 1.4. Apparently, the two version were not compatible, and Pagefind 1.4 was no longer able to search. I solved this by clearing the cache in Brave.

The reason behind the cache problem was that in the NGINX configuration I had:

location ~ \.(js|css|jpg|jpeg|png|webp|mp4|pdf)$ {
    add_header Cache-Control "public, max-age=7776000";
}

JavaScript is advertised by the web-server to be cached by the browser for 90 days: 90 * 60 * 60 * 24 = 7,776,000.

The ordinary user can see this header either in his browser, or using curl:

$ curl -I https://eklausmeier.goip.de/pagefind/pagefind-ui.js
HTTP/1.1 200 OK
Server: nginx/1.28.0
Date: Tue, 09 Sep 2025 10:26:46 GMT
Content-Type: text/javascript
Content-Length: 84597
Last-Modified: Mon, 08 Sep 2025 17:05:18 GMT
Connection: keep-alive
ETag: "68bf0cce-14a75"
Cache-Control: public, max-age=7776000
Accept-Ranges: bytes

For images, videos, and PDF that caching interval is adequate. For Pagefind 1.4 it was not.