Can canned beer be frozen for longer than bottled beer? In a bid to chill my beer quickly, I've placed my bottles in freezer only to find myself cleaning up a mess a few minute later. 

In order to save myself from having this happen again, is it ok to leave beer in cans inside freezer for a longer time?
Cans should be okay in the freezer for a long time, however they will probably dent outward as the water freezes.  Bottles will pop the cap since that is the weakest part of the container.

All that being said, the quality of the beer may deteriorate from being frozen as the water will separate from the alcohol during freezing and they may not mix evenly when thawing.