• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

optimizely / javascript-sdk / 18315953326

07 Oct 2025 02:25PM UTC coverage: 78.76% (-0.2%) from 78.946%
18315953326

push

github

web-flow
    [FSSDK-11879] flush events without closing client on page unload (#1087)

Currently, in browser, when the page is unloaded, the sdk instance is being closed in order to flush pending events. But when the page is loaded from [bfcache](https://developer.mozilla.org/en-US/docs/Glossary/bfcache), the sdk instance stays closed as bfcache restores the Javascript heap as well, which causes further events to be not processed. 

This PR updates the code to flush events on page unload without closing the sdk instance.

1458 of 2804 branches covered (52.0%)

Branch coverage included in aggregate %.

2 of 22 new or added lines in 8 files covered. (9.09%)

8832 of 10261 relevant lines covered (86.07%)

336.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

6.64
packages/optimizely-sdk/lib/event_processor/batch_event_processor.ts


Source Not Available

The file "lib/event_processor/batch_event_processor.ts" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc