It depends, you have to strike a balance. Most of the major online retailers now have a return-if-it-doesn't-fit policy. So other than the convenience of time, it's not that huge of a difference buying from a shop VS online. But keep in mind what would happen if you don't support your local shop and it goes out of business.
Some shops are better than others. Some have employees that are very knowledgeable and helpful for your gear needs, and being there in person gives you the addition of visual props to look at and fiddle with. Others, you'd be better off relying on the members of scubaboard to try to describe it out in writing.
For me, if my local dive shop goes out of buisness, I couldn't get things like free coffee out of the Keurig, free cuddles with the shop dogs, free cookies, donuts, and sweets, the phone number of that cute girl at the scuba club meeting, oh yeah and not to mention a local place to service my equipment and fill my tanks.
Now my shop doesn't stock everything, but if I'm saving a few dollars on a battery kit that has to be ordered anyways, I'll still pay more to support my shop.
Online shopping is a great way to save money. But having a local home base for your scuba needs is something the online community cannot fill.