I see on the devtool console that even thought my fonts are being preloaded it still gets downloaded again.

  1. I noticed after deployed an app customizer to SP online some asset types are not cached from the ClientSiteAssetsFolder could that be the problem and how can I control the types which are cached without having to use a different cdn?

  2. even thought the fonts are simply woff assets the requests are being made by the spservice worker, and the type of the request is "fetch" which comes back with a max-age=0. Could this be the reason it is getting downloaded again?

  3. I am bundling the files with webpack 5 and the font on the css is pointing to the actual font resource and not a js module.

enter image description here


If anyone is wondering what was the issue. I was using the sharepoint public cdn from msonline and it takes around 15 minutes for the files to get invalidated which led to inconsistent load of the assets.

On the preload the assets were coming from the public cdn and from the css they were set to the sharepoint library.

After a day trying again with a clear cache the assets were getting cached and I was able to use the preloaded asset.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.