Interesting topic here!
It is indeed true that in the long run,head,neck and spinal injury could arise from headbanging!
As for me,what I usually do at shows is that I do not really bang my head but bang my whole upper body,leaving my head and neck almost untouched. Then,as soon as I get home,I usually take a painkiller and apply some gel (like Termozene or other muscle relaxing gel like Olfen gel) on my neck and back. The next day,I may feel some pain but it is bearable.
Anybody else got any tips?