Are you a Vasily Zaytsev wannabe who just needs a few tips on how to make the most of your long-range rifle, or do you find yourself in a position where you have to put the hurtin' on a Sniper before he can put the hurtin' on you?
When playing as him:
-Never fire twice in a row from the same spot
As a significant amount of a Sniper's frags will consist of other, enemy Snipers, it's never a good idea to let the other guy know where you are. Kill him from one area, then run somewhere else -- if he's too wrapped up in thoughts of revenge to notice, he'll immediately aim where you used to be, thus giving you the extra half-second necssary to put one in his dome.
This is also sound advice when it comes to dealing with any other class; Demomen love to shoot grenades into Sniper nests, so refusing to stay in one spot will confuse the hell out of them.
-Spend the least amount of time outside of cover as humanly possible
Again, this is a method of safeguarding yourself against enemy snipers. It only takes a split second for a sharpshooter on the other team to squeeze off a shot, so try to pop out of cover for less than a few seconds at a time. Quickly sidestep out, survey the area, take any obvious shots (a Heavy Weapon Guy standing aimlessly in the middle of a map, for instance), and then move back into cover before the other Sniper has a chance to take you out.
It can take a while to develop the skill of quickly surveying the landscape within a single second of leaving cover, but learning how to do so properly will make you very, very difficult to kill.
-Watch your back
Spies love killing Snipers almost as much as they love killing Heavy Weapon Guys. Snipers tend to only look in one direction, and the scope on their rifles effectively eliminates all of their peripheral vision. For this reason, don't hesitate to put down the scope for a few seconds and look around -- especially if you've just killed an enemy Sniper and he hasn't reappeared anywhere, even though his respawn timer should have already elapsed by now.
Irritable, unsportsmanlike Snipers who have been defeated by enemy marksman will often decide to quickly switch to the Spy class, infiltrate the enemy base, backstab the Sniper who previously owned them, and then switch back to the Sniper class, secure in their fighting ability. Don't let yourself be victimized by these bastards.
-Headshots are worth it
This may come as something of a surprise, but the Sniper is the only character in TF2 who can deal extra damage by aiming for the head. Headshots are a Sniper-specific privilege -- one which should be utilized as much as humanly possible.
While a fully charged torso shot can instakill a Scout, Sniper, Spy, or Medic, the Headshot is the only way to immediately kill a fully-healed Heavy Weapons Guy or Soldier. Given the goddamn size of these characters' heads, it's really not too hard to actually pull of a headshot. Just take your time, move the cursor with your target, lead them just a tiny bit, and BOOM -- headshot.
-Become a first-aid junkie
As a Sniper, make it your duty to always be at 100% health, whether you have to hire a medic, run back to the spawn, or scramble around looking for health packs, it's worth it to put yourself in a position where you cannot die quickly. Snipers have a fair amount of health, but not so much that they can't be torn to shreds by most of the offensive classes within the span of a few seconds should they not be at 100%.
As a (mostly stationary) Sniper, it is important to numerically reduce the things you have to worry about -- panicking about dying at the hands of a Sniper headshot or a Spy backstab is better than worrying about both of those things, and death by stray rocket, and the potential of getting owned by a distant Heavy Weapons guy, and on and on and on.
-Never, ever try to use your sniper rifle without the scope up
The sniper rifle was intentionally designed not to do an even remotely considerable amount of damage unless charged, so as to prevent it from becoming an uberweapon.
If you have to run through corridors or engage an enemy in close-quarters combat, do yourself a favor and switch to your SMG or machete. Firing your sniper rifle with the scope off probably does about as much damage as a single bullet from the Scout's pistol, if not less.
-Don't camp in obvious Sniper-friendly areas
Large, high windows that oversee the entire map literally scream "SNIPER AREA" to your enemies. They assume Snipers are in there even when there aren't any, and tend to act accordingly. There's no harm in hanging around these sniper nests for a few seconds, maybe surveying the area and (if you're absolutely sure you can pull it off) making one or two kills, but you should never stay in one of these areas for long.
Spies flock to them like bees to honey, Demomen love to chuck grenades inside, and the large, rectangular windows you aim out of will make a really great frame for the enemy Sniper who blows your head off with a fully-charged shot. Instead, keep mobile and camp in places the enemy wouldn't expect to see you (ideally with your back to some sort of natural wall).
-Treat your laser sight like a curse
The scoped rifle emits a laser sight that, while helpful for aiming, is extremely visible to your enemies. If you're aiming at a doorway where you think someone will come out, then they won't come out -- instead, aim a few inches to the left or right of the door, where the enemy can't possibly see the laser until it's far too late.
When playing against him:
As a Spy, either backstab him if you can, or blow him away at close range with the pistol if you can't. Even the best Snipers will often neglect to cover their backs, though, so a persistent Spy will always find an opportunity to shank a Sniper.
Scouts are really great at eliminating Snipers (especially on 2fort, where they have a direct path from one 2nd-story battlement to another); the Sniper's submachine gun doesn't have enough ammo to kill a jackrabbiting Scout, thus giving you the opportunity to feed him a faceful of buckshot after he begins to reload.
As a Heavy Weapons Guy, do not assume that you will be able to easily make it past a lone Sniper just because you have an asston of health. You won't. Heavies move very slowly and they've got heads roughly the size of watermelons -- in other words, they're irresistible targets to a Sniper. Get a Sniper or a Soldier to give you covering fire before making a run for it (the Soldier's rockets won't actually hit the enemy Sniper, of course, but they will force the Sniper to move from side to side to avoid damage), or wait for a Spy to try and Eff his Ess up.
I've also seen some really clever Demomen plant a bunch of sticky bombs in an area Snipers tend to frequent, then run back and jump around so as to call the Sniper out of hiding. The Sniper peeks around his corner, aims, and almost fires, before the Demoman detonates the bombs and blows the living hell out of the Sniper. It's not a particularly time-effective method of Sniper disposal as it requires the Sniper not be around when you plant the bombs, but it's funny as all hell if done correctly.
can cause it. You can fix it by adding *.disqus.com to your whitelists.