edit-task
Home
Up
Delete
Task Name:
Task Description:
PRB - xdomain request, cors VS jsonp OR , USING cors (see caveats in BM art )
TaskGroup ID:
Start Date:
Start Time:
Duration:
Priority:
Status:
To Do
Completed
In Process
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">title</h1> <h2>[previously]</h2> <ol> <li><strong>[PROBLEM]</strong></li> <li>] db is on sospep.com, qry files are on </li> <li>] site is on subdomain - hike.sospep.com</li> <li>] getJSON doesnt work - cross origin access </li> <li>] SOLUTION - implemented CORS on server</li> <ol> <li>] across domains, subdomains or even different ports on same domain </li> </ol> <li><strong>] USE jsonp - </strong></li> <ol> <li>] BM - EX https://learn.jquery.com/ajax/working-with-jsonp/ </li> <li>] EX - like yql, wraps json in script, with callback, </li> <li>] CONS - breaks down when using post to put data</li> </ol> <li><strong>] USE cors </strong></li> <ol> <li>] BM - WHAT - http://www.html5rocks.com/en/tutorials/file/xhr2/</li> <li>] BM - HOW/TO EX - http://encosia.com/using-cors-to-access-asp-net-services-across-domains/</li> <li>] BM - Pros/Cons - http://stackoverflow.com/questions/12296910/so-jsonp-or-cors</li> <li>] BM - </li> <li>] doesnt work in IE prior to v10, some support in 9/8, content type = text only </li> <li>] http://stackoverflow.com/questions/7735955/cross-subdomain-ajax-request-denied-even-when-document-domain-is-set-correctly</li> </ol> <li><strong>] WORKAROUND</strong></li> <ol> <li>] copy qry files from domain 1 to this domain</li> </ol> <li><strong>] REF</strong></li> <ol> <li>] http://usejquery.com/blog/jquery-cross-domain-ajax-guide</li> <li>] What is jsonp - http://stackoverflow.com/questions/2067472/what-is-jsonp-all-about?rq=1</li> <li>] http://en.wikipedia.org/wiki/JSONP</li> </ol></ol> <h2>[currently]</h2> <ol> <li>] change server config to allow requests ( 2 lines in web.config, specify url or use wildcard for any )</li> <li>] </li> </ol> <h2>[next]</h2> <ol> <li>]</li> </ol>