If you accidentally visit a bad web site once, and never go back it is unlikely you will go to jail. If you frequent the site, then you may have demonstrate criminal intent. If you save or retrieve any content that could also get you in trouble, especially child porn.