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 NHS in Wales is set to receive a multi-million pound investment to help it respond to winter pressures, it's been announced today.
Snacks, takeaways and even alcohol continue to fuel an obesity crisis among pets in Wales, according to a leading veterinary charity.
Wales could soon become the first part of Europe with a legal duty to have sufficient nurse staffing levels on hospital wards.