4 ms·
I don't get the point of this in a client script. What does it do that can't be done server side with the http headers? Maybe it can be useful inside SPAs but t
by chimen 8y ago
I don't get the point of this in a client script. What does it do that can't be done server side with the http headers? Maybe it can be useful inside SPAs but this sort of info should be immutable and read only which is next to impossible on front facing apps.
- buremba 8y agoYou can still emulate the Referer header in order to trick the server side. It's easier to do this on the client side in order to avoid complexity on server-side because the servers need to be aware of all the browsers used by the client.
- chimen 8y agoMakes no sense. What complexity are you talking about? You get that info on the client to create another request to the server in order to send it over?
- buremba 8y agoUnless you're only tracking the pageview events, it's not an additional request. Most of the analytics SDKs use either XHR or Pixel tracking. It's often easier to build up a separate analytics pipeline rather than using the backend server logs.