fixing problem with XMLHttpRequest (request type) recognition