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
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Added Cache Buster so images never get cached by browser or proxy server

  • Loading branch information
vhalbwachs committed May 7, 2015
commit 01b695ee7aad1b765d9bd5d9674e02df54c5357e
@@ -118,8 +118,10 @@

try {
var im = new Image(),
q = 'PLAINTEXT=' + encodeURIComponent(JSON.stringify(data));
im.src = this.inputUrl + q;
q = 'PLAINTEXT=' + encodeURIComponent(JSON.stringify(data)),
// prevent browsers and proxy servers from caching tracking pixel
cacheBuster = 'CACHEBUST=' + Math.random() * 10000000000000000;
im.src = this.inputUrl + q + '&' + cacheBuster;
} catch (ex) {
if (window && window.console && typeof window.console.log === 'function') {
console.log("Failed to log to loggly because of this exception:\n" + ex);

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.