load javascript files unless xhr requests