Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cache Buster to url #17

Closed
wants to merge 3 commits into from
Closed

Add Cache Buster to url #17

wants to merge 3 commits into from

Conversation

@vhalbwachs
Copy link
Contributor

@vhalbwachs vhalbwachs commented May 7, 2015

This fixes issues with browsers caching the tracking pixel if multiple requests go out the result in the same url being generated.

For example, if the following code were to run:

for (var i = 0; i < 10; i++) {
    _LTracker.push('clicked on search');
}

In most browsers, only one request would be made for the image, and the subsequent 9 requests would be returned from the browser cache.

This adds a CACHEBUST parameter with a random string of numbers to the url so that each request is unique. The additional parameter gets ignored by Loggly's collectors, so it doesn't modify the tracking payload.

@mostlyjason
Copy link
Contributor

@mostlyjason mostlyjason commented Jul 22, 2015

Deprecated by #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.