braze-inc / braze-web-sdk

Public repo for the Braze Web SDK
https://www.braze.com
Other
71 stars 25 forks source link

Question: Long loading "fontawesome" block other asset in Safari/Chrome browser #88

Closed corelationNut closed 4 years ago

corelationNut commented 4 years ago

Hi,

Just want to share issue what I face to you guys not sure is it browser or code issue.

Today on our Mobile website (safari, chrome) found that Braze SDK trying to load css from use.fontawesome.com and somehow download was taking too long time (around 3 mins), it's causing our website block to load other asset likes image and css.

After remove Braze SDK from website (which stop calling fontawesome), everything working fine again.

We're plan to use option doNotLoadFontAwesome then load fontawesome from local to fix this issue. But it would be better if we know/understand an issue too.

Do you guys have any idea or familiar this issue?

This issue can reproduce

This issue cannot reproduce

Thanks, Nuttakron

image

wesleyorbin commented 4 years ago

Hi @corelationNut! Thanks for reaching out. I'm sorry you're having this issue. We have not seen this happen before and we are unable to reproduce locally. Just a couple of questions to help us investigate this:

corelationNut commented 4 years ago

Hi @wesleyorbin ,

Thanks for response, please check my answer below.

I'm not sure is it possible to put timeout for download fontawesome in Braze SDK too ?

FYI, I'm testing this issue with China VPN and China QA (they live in China) also can reproduce this issue, it's always can reproduce with platform that I mention.

VPN: https://getoutline.org/en/home

Best regards, Nuttakron

corelationNut commented 4 years ago

Also is it possible can you provide all download dependencies library other than fontawesome in Braze SDK code?

Thanks, Nuttakron

wesleyorbin commented 4 years ago

@corelationNut Thanks for the detailed response! This sounds like it could be a WebKit issue since it's isolated to Safari and iOS browsers. However, I'll file an issue internally to do a deeper investigation to see if there's anything we can do to mitigate the loading issue. It's not possible at this time to set a timeout for the download through the SDK.

FontAwesome is the only external library that the Web SDK downloads. As you mentioned in the initial comment, using the doNotLoadFontAwesome initialization option and hosting the CSS locally should resolve this issue for you. Since there's a viable workaround, I'm going to close out the issue. However, if you encounter further issues, feel free to re-open.