[JqueryMobile] - Jquerymobile CrossDomain(PHP, ASP) 사용법

Jquery & Mobile 2012. 2. 2. 16:30
반응형
jquery-mobile.1.0 version 부터 사용가능합니다.

<script>
   $(window.document).bind('mobileinit', function(){
           $.mobile.allowCrossDomainPages = true;
        })
</script> 

추가

서버 처리페이지

ASP

Response.AddHeader "Access-Control-Allow-Origin", "*"
Response.AddHeader "Access-Control-Allow-Methods", "GET, POST, OPTIONS"
Response.AddHeader "Access-Control-Allow-Credentials", "true"
Response.AddHeader "Access-Control-Allow-Headers","X-Requested-With"
Response.AddHeader "Access-Control-Max-Age", "86400" 

PHP

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header('Access-Control-Allow-Headers: X-Requested-With');
header('Access-Control-Max-Age: 86400'); 

추가하세요~ 
반응형
: