All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
According to your information your husband prays and is nice with you, but he visits pornographic sites. As long as he performs prayers and does not violate your rights you are not allowed to ask for divorce. Asking divorce without any considerable reason in Islam is forbidden. For details read Fatwa: 87728.
We pray to Allaah, The Almighty, to help you and us and grant us all steadfastness on His Right Path. What you have to know, our dear sister, is that you must warn your husband from Allaah's Wrath, advise him, and remind him continuously of Allaah and the Last Day (the Hereafter). You have to do your duty with him in enjoining good, forbidding evil, and reminding him of the Quranic verses and the Hadeeth (Prophet's saying) that commands Muslim men and women to lower their gaze. Tell him that by failing to do so he will set a bad example for his children and ask him what his feeling would be if he sees his children doing the same. You must use wisdom and lenient and soft of argument when discussing this matter with him in order to avoid his negative or violent response. It might be better to give him some booklets or cassettes that address the problem. To know the ruling of surfing pornographic website read Fatwa: 89335.
Allaah, the Glorified and the Exalted, knows best.