All this data is potentially out of date, and should be taken with a truckload of salt
Ransoming - always the best option.
Most important here is the local chat channel. You may not have time to open a private conversation with your attacker before you die, and if you're being attacked by a group of pirates, then you may not convo the leader with the first attempt. Your best option is to ask for a ransom in the local chat channel.
If they agree to ransom you, pull in all your drones if you have any deployed, stop moving towards the gate/trying to escape and stop shooting/running your tank or they'll probably just kill you anyway because they think that you're trying to fool them or stall for time while your friends show up.
If you're in a very small/inexpensive ship, don't expect to be ransomed very often. Generally speaking, pirates only ransom targets that they think will be worth their time and effort to do so. When requesting a ransom, make sure that the agreement is for both your ship and your pod to exit safely from the system.
If you come to a ransom agreement and are released after payment is made, exit the system right away. Don't stay around and smack the pirates. That's not good etiquette and will probably result in your death the next time you're caught by the same bunch.
A reasonable ransom to expect is about 50-75% of the total cost of your ship and fittings, including rigs. If you suggest a ransom payment of something less than that, you'll probably just end up with the pirates killing your ship and pod. If you suggest a ransom that is much more than that, they'll probably kill you just to see what you have fit (faction items etc.).
Most highly organized and professional pirates have ship/cargo scanners at some of the larger gate camps, so don't expect to get away with a small ransom if you have a lot of valuable cargo/fittings in your ship. If you're in a hauler (for example) and the pirate gang leader demands a very large ransom for your hauler, and you know that it's proportionate to your cargo value, assume that you've been cargo scanned.
This page must have been created by a pirate for noobs! What pirate in their right mind would take your ransom ISK and then let you go along your merry way when they can for sure pod you? BEWARE once they have your ISK there is nothing stopping them from taking your precious booty, modules, rigs ( oops can't get those! ) and clone!
Some pirate corporations will initiate ransom negotiations and many will keep their word and let you go. There are some who will take your money and then gleefully blow you up.
Take their names down and post it on various forums and discussion groups. Reputations do matter and a pirate corp with a reputation for going back on their word will see their ransom income shrink. Other pirate corporations (interested in maintaining the 'honour' of piracy) might feel compelled to intervene.