Online retailers are to be forced to carry out stronger checks to stop young people acquiring knives.