changed phantom.js to open socket and ajax both