Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

do not use cookie if user navigated using back/forward buttons, cooki…

…e will be wrong
  • Loading branch information...
commit 3a17705d02a0f34870dda0906bdfc9e6b5b92bf3 1 parent db4057d
Philip Tellis bluesmoon authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 boomerang.js
11 boomerang.js
View
@@ -480,6 +480,7 @@ var impl = {
// If set to false, beacon both referrer values and let
// the back end decide
+ navigationType: 0,
navigationStart: undefined,
responseStart: undefined,
@@ -533,6 +534,10 @@ var impl = {
// http://blog.chromium.org/2010/07/do-you-know-how-slow-your-web-page-is.html
p = w.performance || w.msPerformance || w.webkitPerformance || w.mozPerformance;
+ if(p && p.navigation) {
+ this.navigationType = p.navigation.type;
+ }
+
if(p && p.timing) {
ti = p.timing;
}
@@ -716,9 +721,9 @@ BOOMR.plugins.RT = {
}
}
- if(t_start) {
- BOOMR.addVar("rt.start", "cookie");
- }
+ if(t_start && impl.navigationType != 2) { // 2 is TYPE_BACK_FORWARD but the constant may not be defined across browsers
+ BOOMR.addVar("rt.start", "cookie"); // if the user hit the back button, referrer will match, and cookie will match
+ } // but will have time of previous page start, so t_done will be wrong
else {
t_start = impl.navigationStart;
}
Please sign in to comment.
Something went wrong with that request. Please try again.