added beforeSend for remoteUrl: