I found two of your opening statements quite jarring:
I find myself just browsing the internet when he leaves [...]
Is it unprofessional to leave early if he's gone already?
Some people are answering this based on what's acceptable locally or what's contractually mandated but professionalism isn't anywhere near as subjective. It's easy:
It's unprofessional to waste time you're being paid for.
If you're working on a clock, your time is your employers to use; you should be working while you're there. If you've finished your assigned tasks, that work can manifest itself in a number of ways that really boost your future productivity:
- Double-checking support tickets to make sure you've closed the ones you've handled that day.
- Reflecting on the day's work and adding comments so Next-Week-Jaken doesn't waste an hour trying to understand why you did what you did.
- Planning. Listing and prioritising what you're going to do tomorrow.
- Maintenance. Cleaning your desk, desktop, chucking out old notes, etc.
- Self-improvement through training, even something like helping out in your technical discipline on Stack Overflow.
These are all things you'll have to do at some point. In my experience, this is the rubbish that some people manage to fill 9-10am with. Getting this out the way will allow you to start your next day focussed and prepared.
But that's all secondary to what your boss wants you to do... So ask!
You know when you're running out of work and you know when your boss is going to be available, so let them know you're going to have 20-40 minutes free today and ask them what they'd like you to do.
They might want you to hang around to handle calls, they might want you to start on something else, they might suggest another activity we haven't thought of, or they might even let you off early. Either-which-way, it's your employer that has told you, not a bunch of anons on the Internet.
If nothing else, you'll be a rockstar in your boss's eyes. That helps when applying for your next job.
There is an argument that it's your manager's responsibility to utilise your time but that's their angle. In terms of professionalism —again— it's unprofessional to waste time you're being paid for. It's your responsibility to let them know you've finished your work.
Be pro-active here. If you add up these 30-minutes, you're looking at 120 hours a year. That's thousands of dollars in salary (Texas webdev average) so even if you don't appreciate that you might end up doing more work and spending less time on Facebook, imagine what you'd want from your employees.