Skip to content

Add initial localStorage support for intermittent offline beacons - #24

Closed
Ryan Sorensen (rcs) wants to merge 2 commits into
snowplow:masterfrom
rcs:localStorage
Closed

Add initial localStorage support for intermittent offline beacons#24
Ryan Sorensen (rcs) wants to merge 2 commits into
snowplow:masterfrom
rcs:localStorage

Conversation

@rcs

Copy link
Copy Markdown
Contributor

This adds support for queuing request into localStorage when they can't be loaded immediately.

The queue will try to fire all requests off to the collector whenever a request is requested and successful.

I haven't been able to test in a browser without localStorage support -- any tips there?

@rcs

Copy link
Copy Markdown
Contributor Author

#23

@alexanderdean

Copy link
Copy Markdown
Member

Ryan Sorensen (@rcs) - whoah, this is awesome! Thanks for this. Two things:

  1. Confusingly, hasLocalStorage does not indicate whether JavaScript can access that localStorage. So you will get errors in some Firefoxes as per JavaScript tracker fails on Firefox with "Always ask" setting for cookies snowplow#163 Suggestion: add a new method to helpers.js which is localStorageAccessible and return false in the catch {} block (where hasLocalStorage returns true)
  2. Have you signed our CLA yet? https://github.com/snowplow/snowplow/wiki/CLA

@rcs

Copy link
Copy Markdown
Contributor Author

Grabbed the code out of Modernizr, since it's explicitly dealing with some private browsing features that wouldn't be hit otherwise.

The CLA was submitted yesterday.

@alexanderdean

Copy link
Copy Markdown
Member

Thanks Ryan Sorensen (@rcs) - code and CLA looks great. Will merge this into a branch for a 0.13.0 release... Will need quite a lot of testing at our end to check it doesn't break anything...

@alexanderdean

Copy link
Copy Markdown
Member

This has been pulled into master through the 1.0.0 work - big thanks Ryan Sorensen (@rcs) ! Closing.

@alexanderdean

Copy link
Copy Markdown
Member

My bad - this is going into 2.0.0, reopening till then...

@alexanderdean

Copy link
Copy Markdown
Member

This is published now - huge thanks, Ryan Sorensen (@rcs), closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:enhancement New features or improvements to existing features.

Development

Successfully merging this pull request may close these issues.

3 participants