marker-io / browser-sdk

Marker.io browser SDK
MIT License
8 stars 8 forks source link

Does this library load two versions of marker-io? #17

Closed vanecgs closed 1 year ago

vanecgs commented 1 year ago

While working on performance enhancements in a project, I noticed this library loads two files which seem to be different versions of marker-io or are these file two different things?

/latest/3.v1.49.0.c7628fa0355869e73f1c.js /latest/4.v1.49.0.cf91bfe42d212993d552.js

olivierkaisin commented 1 year ago

Hi @vanecgs,

These two javascript files belong to the same version of Marker.io (v1.49.0), but they are two different chunks of our javascript bundle.

The reason we use bundle chunking is to make sure that we only load parts of our widget that are necessary.

For example, if you were to disable our session recording feature, the logic related to our recorder would not be loaded in the visitor's browser, reducing both bandwidth and CPU usage. However, I recommend keeping all recording features enabled, as it makes it easier to understand and reproduce complex bugs.

If you have any other questions, let me know. Olivier