2

I just found out that Firebase Storage uses some less-then-ideal caching headers (it basically doesn't allow the browser to cache anything). After some digging I found that I could modify this behaviour by setting a file's metadata

But what if I just want all files in a certain folder (/static/, for example) to have a really long expiration? Do I really need to set the metadata for every single file I upload (more data usage, more code) or is there some way I can create a rule?

The most logical place for this would be the 'rules' tab but from the docs it looks like this is only used for access control? (security)

KENdi
  • 7,576
  • 2
  • 16
  • 31
REJH
  • 3,273
  • 5
  • 31
  • 56
  • 1
    I would like this behavior for my use case as well (admins can upload nearly static content and users view it), but it seems Firebase recommends using Hosting, not Storage, for static content. https://stackoverflow.com/questions/44124537/set-cache-to-files-in-firebase-storage – Fractaly Aug 19 '17 at 10:14

0 Answers0