Skip to content

Commit

Permalink
Do not send a beacon on iOS WebViews
Browse files Browse the repository at this point in the history
It turns out that submitting a hidden form to an anonymous iframe in
a UIWebView on iOS will cause a new Safari window to open with our
beacon URL.  This is not desired behaviour, and until we can figure
out a better way to send a beacon under these conditions, our best bet
is to suppress the beacon.

This is not entirely a problem because any beacon that would have been
sent does not have any timing information (no previous page and no navtiming)
  • Loading branch information
Philip Tellis committed Jan 29, 2015
1 parent a80ff0c commit aacb6e3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions boomerang.js
Expand Up @@ -634,6 +634,11 @@ boomr = {
var input = document.createElement("input"),
urls = [ impl.beacon_url ];

// running inside a UIWebView. Our beacons don't work well here
if(navigator.standalone === false) {
return;
}

form.method = method;
form.id = "beacon_form";

Expand Down

0 comments on commit aacb6e3

Please sign in to comment.