WJA
WJA

Reputation: 7004

Cache in Firebase Hosting Custom Domain

I am using Firebase hosting.

I noticed that sometimes deployments are not pushed to my custom domain associated with my account.

So changes happen in:

myurl.firebaseapp.com

But not on

Myurl.io

Is this Firebase related?

Upvotes: 1

Views: 342

Answers (1)

Raag Singh
Raag Singh

Reputation: 525

Using firebase.json you can define and control cache. The following json snippet let you define the cache for 1 year for the images.

{ "source" :"**/*.@(jpg|jpeg|gif|png)", "headers" : [ { "key" : "Cache-Control", "value" : "max-age=30672000" } ] }

Source: How To Enable Caching With Google Firebase Hosting?

Upvotes: 1

Related Questions