There is no surefire way to prevent accidental likes on Instagram, other than being extremely careful. Nevertheless, if you want to view a profile and make sure you don't accidentally like something, you can do so by setting your device to Airplane Mode, which disables all Wi-Fi and internet connections.