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

tracking multiple clicks/hovers/events #6

Open
notVitaliy opened this issue Jan 16, 2018 · 10 comments
Open

tracking multiple clicks/hovers/events #6

notVitaliy opened this issue Jan 16, 2018 · 10 comments

Comments

@notVitaliy
Copy link

You can have the track.php script return a 404. The browser won't cache the response and attempt to get it again on the next event.

@jbtronics
Copy link
Owner

Ok, i will test it and try to implement this.

@jbtronics
Copy link
Owner

I tried this and it didnt worked for me (in Chrome and Firefox). I tried some other status codes and some cache control headers, but i was not able to have the browser request a css url multiple times...

@notVitaliy
Copy link
Author

Strange. I was able to get it to work locally. I'll take a look again tomorrow.

@ShirtlessKirk
Copy link

Browsers will tend to remember a 404 and serve the response from the cache if possible. If the content isn't available it may well default to the internal error page. Returning a 200 with valid (but unused) content, like some empty dummy class or maybe even empty string would prevent the request showing up as an invalid one in the console.

102 and 202 look like fun responses to subvert though 304 (commonly seen, so easily ignored) might be a sneakier option.

@lury
Copy link

lury commented Jan 20, 2018

maybe you could work on cache controlling header on server side
Cache-control: private, max-age=0, no-cache
E-tag
etc.

@diamont1001
Copy link

I think this does not matter with the cache.
Firstly, we should focus on how to trigger request css resources repeatedly but not on how to disable the cache.

@notVitaliy
Copy link
Author

@diamont1001 By not allowing the resource to be cached by the browser it will try to get the resource again the next time that it's requested.

We're not talking about caching the resource across browser page loads and reloads. This is about not letting the browser cache the resource at all.

@diamont1001
Copy link

diamont1001 commented Jan 26, 2018

@notVitaliy OK, maybe we should try the following steps first:

  1. set background-image: url(xxx); to <a> in demo page, for example:
a.btn:hover {
  background-image: url(xxxxxxxx);
}
  1. open dev-tools and load demo page in browser
  2. clear the browser's cache (all)
  3. Move your mouse over the <a> again and again
  4. check the 'network' in dev-tools

@lury
Copy link

lury commented Jan 26, 2018

maybe you should split this into two issues - one for php server code and one for css?

@Bogdaan
Copy link

Bogdaan commented Feb 2, 2018

@notVitaliy Seems its not posible to fetch URL(X) each time on focus in single session.

Im write some code (at https://github.com/Bogdaan/spycss-demo), and try almost all HTTP/1.1 codes.
Browser always cache first response in single session. Only after page refresh it can be downloaded again.

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

No branches or pull requests

6 participants