Andy Williams missed a first half penalty as Town completed a League double over Barnsley with the win moving them into second place in League One.
Swindon manager Mark Cooper made two changes to his starting line up with Massimo Luongo and Yasser Kasim going straight back into the team after their exploits in the Asian Cup. Nathan Thompson missed out due to a dead leg and Jon Obika was named on the substitutes bench.
Danny Wilson’s Barnsley side kicked off playing towards the Town End but it was Robins who had the first attack in the 6th minute when Luongo squared the ball across the area for Byrne who fired just wide of the upright.
Barnsley responded immediately at the other end through Paul Digby who sent in a shot from 20 yards which struck a Town defender and the ball went out for a corner which was easily dealt with by Foderingham who caught the cross.
Jack Stephens made a superb run through midfield weaving past several opponents before being stopped by a defender just as he was about to shoot in the 13th minute. Shortly afterwards Town went ahead thanks to John Swift who tricked his way into the penalty area following a short corner and the Chelsea loanee’s shot was cleared by a defender but the ball ran kindly for Raphael Rossi-Branco who lashed home from 15 yards.
Milan Lalkovic threatened briefly for the visitors in the 22nd minute after charging past Turnbull on the right wing before firing in a shot from the edge of the area but Foderingham caught the ball at the first attempt.
Ben Pearson was fortunate not to be shown a yellow card for a late challenge on Thompson but the referee Gary Sutton decided that a lecture was sufficient punishment.
Andy Williams tested Barnsley keeper Ross Turnbull in the 32nd minute with a lobbed effort after sidestepping a defender but his shot lacked power and the keeper caught the ball cleanly.
Nathan Byrne carved out a great chance for himself shortly afterwards after charging through midfield and into the penalty area but he stumbled momentarily then his pass to the overlapping Luongo went just ahead of the Australian and the ball ran out for a goalkick.
Swindon were awarded a penalty in the 38th minute when John Swift was tripped in the penalty area after receiving the ball from Byrne but Williams’s soft effort was easily saved by the keeper who pushed the ball away for a corner
Town finished the half pushing hard for the second goal and they were only denied by a fine save made by Ross Turnbull who pushed Byrne’s close range shot away for a corner. There was just time for Jordan Turnbull to head wide from a cross shortly before the half time whistle was blown.
Barnsley made two substitutions at half time with Conor Hourihane and Dale Jennings replacing Martin Cranie and Paul Digby.
There was a break in play early on when Toffolo collided with an opponent but he was able to continue after treatment.
Swindon were pressing forward at every opportunity with Byrne and Swift featuring heavily and earned a corner in the 55th minute which was wasted and allowed the visitors to launch an attack downfield which was cut out by Byrne.
Barnsley were pushing forwards in numbers to try and get an equaliser which gave Town space to attack particularly down the left wing without being able to get a clear shot on goal . Town had a great chance in the 67th minute when Williams outpaced the defence and found himself with only the keeper to beat but his effort struck the keeper and the ball went out for a corner.
Barnsley’s final substitution in the71st minute saw Alex Kiwomya replace Lalkovic.
Swindon responded by introducing Michael Smith in place of Andy Williams in the 73rd minute and Smith was presented with a great chance to score within two minutes after latching onto a weak defensive clearance but he fired high over the bar.
John Swift left the field to good applause in the 77th minute and was replaced by Ben Gladwin.
Town almost pressed the self destruct switch shortly afterwards when a weak pass out by Foderingham was cut out by a Barnsley forward and the visitors charged forward outnumbered the home side but Rossi-Branco did fantastically to get a last ditch tackle in at the expense of a corner.
Town doubled their lead in the 85th minute following a patient build up when the ball eventually reached Ben Gladwin on the edge of the area and his first time shot squirmed under the keeper and just had enough power to cross the line and into the net.
Nathan Byrne set up Massimo Luongo with a superb shooting opportunity in the 88th minute but the Australian midfielder curled his effort only just over the crossbar.
The visitors had a corner just as the match added the three minutes of added time but Town cleared the danger.
Yaser Kasim was cautioned for a late challenge on Scowen shortly before the final whistle was blown to seal another three points for the Robins.
The win moves Town into second place in League One with 58 points from 29 matches.