Apple is cutting down on how many cookies advertisers can force on to your devices, with changes coming to iPhones, iPads and Macs. The advertisers, naturally, are not happy.

Digital cookies are small text files that can be used to track users as they surf the web, helping to build up a detailed profile of which sites they visit, what they do while they are there, and how long they do it for.

It wasn’t always this way. The cookie has humble origins, as a small file that a website could drop on a user’s computer when it needed to remember something specific about them. That could be the contents of a shopping trolley, or the username they used to log in last time they visited the website. A slightly more advanced version of the same thing is still the core way that websites ensure that you are logged in – an authentication cookie is placed in your browser, meaning that you don’t have to log in each time you refresh the page.

But as the web became more complex, so did the uses of cookies. The rise of large, third-party advertising networks was the genesis of cookie becoming a dirty word: an advert hosted on a website has the same ability to place a cookie on your computer as the site itself. And if that advertising company is widespread enough, it can see the same cookie every time you visit a page that hosts its adverts, helping it to build an accurate profile of your online activity and using it to target more specific advertising to you.

These third-party cookies are relatively easy to spot and block. But a wrinkle is added when a website places the cookie itself, but uses that to track and target the user: think, for example, of that shopping-cart cookie (which you probably do want) being used to show you adverts for the contents of your shopping cart across the internet (which you may not).

This is what Apple is beginning to block with its latest update, and it has caused an almighty freakout from advertisers, who called the move “sabotage” in an open letter.

But this is an arms race, and cookies are just one battlefield. Already, companies have been spotted experimenting with other ways to track users, from measuring the amount of battery life they have left, to seeing how bright the room they are in is. Those are all subsets of the broader field of “fingerprinting”, which allows advertisers to go far beyond simple cookies in tracking a given user around the web.

By comparing devices, IP addresses, browsers and behaviour, it’s possible to know not only what websites you visit on your phone, but that your phone, iPad, and work computer are all you, and let adverts follow you from home to work and back each day. And that’s not even getting started on firms such as Facebook. Persistent conspiracy theories about the social network, which makes 98% of its revenue from ads, listening to conversations through microphones conceal a more prosaic truth: Facebook doesn’t need to do any funny business to target advertising with uncanny accuracy – it just waits for you to tell it all about yourself.