remove useless JS on error page
use can() methods