I have created one web service that will may called from web using jQuery ajax call or may call from desktop application that I have created
I want to know in that webservice method.. Is this ajax call or not?..
Is that possible?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
- how to get selected text from iframe with javascri
If the
HTTP_X_REQUESTED_WITH
server variable is set and equals to 'XMLHttpRequest', you can assume that the request was made via jQuery AJAX.As @Tatu Ulmanen answered you can check the
HTTP_X_REQUESTED_WITH
server variable is set and equals to'XMLHttpRequest'
to know that the request is ajax.For this to work it is important that the correct header is set by you or the javascript library you are using. Otherwise there is no way to differentiate because ajax requests are normal
GET
orPOST
requests