Knowing whether the request is for cached file or not using webRequest

how can I know if the request made is going to get a new version or the version cached by browser?

Interesting question. I don’t think you can get that information beforehand.
You can get it here:

If that is to late for you, I guess you could experiment with pausing the request (return a pending promise) and use XHRs/fetch to get the resource. I think there is an option to only load cached responses or fail otherwise. This would obviously only check if the resource is cached in the cache the extension uses itself (which is the default cookieStoreId?). If the request uses a different cache, it won’t give you a correct result. And the performance will be pretty bad as well.