2

I am doing a jquery.ajax() call on one of our pages to fetch a small text file. I see some of the requests (not all) fail with resp.statusText: "No Transport" and resp.status : 0

What does the error mean (No Transport with a resp code of 0). Strangely it works on some browsers, and doesn't work on some. I couldn't find a patter by looking at the user agents of browsers, where it failed.

Any help would be highly appreciated. I am a beginner to javascript and jquery library, let me know if I omitted crucial information.

My use case:
abc.mydomain.com contains jquery.ajax(url:xyz.mydomain.com) call
user199801
  • 191
  • 2
  • 4
  • Take a look at this post. [http://stackoverflow.com/questions/5241088/jquery-call-to-webservice-returns-no-transport-error](http://stackoverflow.com/questions/5241088/jquery-call-to-webservice-returns-no-transport-error) – Bob Tate Dec 09 '13 at 14:06
  • @user199801 Please follow up on your question and tell us if you have found the answer. – Mohammed Joraid Dec 20 '13 at 03:33

1 Answers1

0

Most likely it prevents you from firing a request because it things you are trying to access another domain. xyz.mydomain.com !== mydomain.com.

Why that is not allowed? Read

An example to why this is a security issue, assume you installed a bad plugin to your browser. If that plugin got the permission, it can read all loaded files to your browser and be able to edit/change/inject content and codes. Then it might send all collected data to designer own server.

... The most common business needs that are easily accomplished with browser plug-ins are: modify default search, add side frames, inject new content into existing webpage ...more

A good practice is to fetch the data thru ajax via JSON, if you are trying to access another site beside the one the script is calling from, then use JSON-P.

Read

A code snippets of your function will help us understand your issue more.

Community
  • 1
  • 1
Mohammed Joraid
  • 6,202
  • 2
  • 27
  • 38