In John le Carré's 1963 novel The Spy Who Came in from the Cold, an intelligence officer named Alec Leamas is thrown out of MI6, takes a job at a library, loses himself in drink and is sent to prison for assaulting a shopkeeper. When he emerges from jail, he is approached by a member of the East German intelligence service, the Abteilung, and travels to Holland, where he agrees to work as a double agent.

Le Carré's precision-engineered story is rightly regarded as a masterpiece, but it would have been almost impossible to construct had the author been writing in the age of the internet, or if the cold warriors of the 1960s had been armed with tablets, laptops and smartphones. Why? Because Leamas's apparent fall from grace is an elaborate MI6 ruse. His behaviour is designed to attract the attention of the Abteilung and to make him look ripe for recruitment. An East German computer and telecommunications whizz would have analysed Leamas's digital trail and inevitably found a flaw in his backstory.

It is no exaggeration to say that technology has transformed the spy novel as comprehensively as the discovery of fingerprinting changed the detective story. Once upon a time, spies like Alec Leamas could move across borders with ease. Passports were not biometric, photographs were not sealed under laminate, and there were no retinal scanners at airports (which, incidentally, can't be fooled by fitting a glass eye or wearing contact lenses manufactured by 'Q' branch). With computers in their infancy, cover stories would stand up to considerable scrutiny. Typically, an MI6 "backstop" would sit beside a telephone in London, waiting to answer calls from suspicious officials overseas, or reply to letters requesting information about an officer's false identity.

Nowadays, travelling "under alias" has become all but impossible. If, for example, an MI6 officer goes to Moscow and tries to pass himself off as an advertising executive, he'd better make sure that his online banking and telephone records look authentic; that his Facebook page and Twitter feeds are up to date; and that colleagues from earlier periods in his phantom career can remember him when they are contacted out of the blue by an FSB analyst who has tracked them down via LinkedIn. The moment the officer falls under suspicion, his online history will be minutely scrutinised. If the contacts book on his Gmail account looks wrong, or his text messages are out of character, his entire false identity will start to fall apart.

Collared in 10 minutes these days … The Day of the Jackal. Photograph: Kobal

Villains in spy novels are just as vulnerable to these advances in technology. Had Frederick Forsyth's Jackal been plotting to kill François Hollande in 2014, rather than Charles de Gaulle in 1963, he would have been collared by Deputy Commissioner Lebel within about 10 minutes. Numberplate recognition technology would have flagged his Alfa Romeo in the south of France, his movements in Paris would have been captured on CCTV, and his several false identities unravelled by GCHQ. And that's assuming he wasn't so rash as to use a mobile phone.

As the Guardian's Luke Harding discovered in his encounters with Edward Snowden, a smartphone can very quickly be turned into a microphone by any half-decent intelligence operative (the solution, apparently, is to stick it in a cocktail shaker). An iPhone will also reveal an astonishing amount of information about its owner, from the calls they have made, to the photographs they have taken, to the places they have visited. (Try it: press "Settings", "Privacy", "Location services", "System services" then "Frequent locations" on your iPhone – and prepare to get a fright.)

As many a paranoid parent or suspicious spouse will know, it is also possible to install an app inside a smartphone that will secretly transmit a constant stream of data about the user's whereabouts. Worried about your teenage daughter? Think your husband is cheating on you? The app will tell you everything about them, from the Whatsapp messages they are sending, to the internet sites they are visiting.

All of this has affected storytelling. If a character can be reached or tracked by phone, it follows that he or she can be warned of impending danger, or rescued from peril. In my novel A Foreign Country, it was necessary to set a crucial sequence deep in the English countryside so that the principal characters were thwarted by feeble mobile reception. Likewise, unless a character knows to remove the battery from their phone (something, incidentally, that can't easily be done with an iPhone) he or she can be followed 24 hours a day, seven days a week. Even when switched off, a phone emits a signal that can be picked up by GCHQ and others. The phone's position can be then be pinpointed to within a few feet by "triangulating" the signal to the nearest satellite or mobile phone mast.

It's not all bad news for the spy novelist. Many of the technological developments of the past three decades have given us opportunities to tell stories in new and interesting ways. In my novel The Trinity Six, an academic on the trail of a sixth member of the Cambridge spy ring discovers a vital clue by analysing the data on an Oyster card. Try it if you have one: simply press the card onto a ticket machine at your local station, press "Oyster history", and you will see a list of your 10 most recent journeys by bus or train.

Nevertheless, it may be telling that some of the most successful thrillers of the past decade – Tom Rob Smith's Child 44, Sebastian Faulks's Bond homage Devil May Care, and William Boyd's Restless – were all period pieces without a mobile phone in sight. By the same token, cinema audiences flocked to Tomas Alfredson's 2011 adaptation of Tinker Tailor Soldier Spy, a 1970s espionage classic in which the mole is cornered not by a laptop or an iPhone, but by something as simple as a missing piece of paper torn from an MI6 file.

The best spy novels are novels of behaviour, of human ambition and frailty. It may be that technology strips the spy of mystique. Where once George Smiley relied on the memory of Connie Sachs, nowadays he could find out all he needs to know by logging into the computer archives at Vauxhall Cross. In the age of Google and CCTV, would the mole in Tinker Tailor have remained in place for as long as he did? Not likely.

• Charles Cumming will be appearing at the Theakston Old Peculier Crime Writing festival in Harrogate, which runs from 17-20 July. His most recent novel is A Colder War.