I would grab a phone, and look out a window (one of my windows also overlooks my front porch). If they don't leave after five minutes, or start to enter my home, I would immediatly dial 911.
I look to see who it is and if i dont know them i leave them knocking on the door. I had a friend that when ever a stranger knocked on the door she would flick the person off
If a stranger knocks on my door, I go upstairs and talk to them through the window. They usually think I'm the resident from the next door apartment and ask if my neighbor is in. I say no and send them on their way.
I typically hide. My friends and coworkers know which door is unlocked, and the other person has a key. Almost anyone who knocks is unwanted or trying to get me to buy stuff; the people around here continue to come back if you answer. It's like feeding the neighborhood cat.
sometimes I will make a fart sound with my mouth and then look through the peephole for their reaction. yes, I only handle these things in the most mature and proper way possible.