During Robert Riley's sentencing, chairwoman of the bench Georgina Scannell voiced her disgust at his "vile" and "offensive" online messages.
The offensive messages outraged the public. You had complete disregard for the tragic death of Ann Maguire.
Besides this, countless other vile messages were made by you.
The bench finds these were racially and religiously aggravated.
The offences are so serious that only a period of immediate custody can be justified.
More top news
The family of 18-year-old Peter Colwell, who died from a single gun shot wound to the head, have paid tribute to him.
A driver has been jailed for four years for killing 80-year-old Tydfil Jenkins as she delivered a cake to a friend.
Capel Curig in Snowdonia clocked winds of 94 mph earlier. Whilst the worst is over, warnings remain in force.