나는 $ 아약스()와 iframe을로드하고있어 속도가 느려집니다 :jQuery를/자바 스크립트는 아약스와로드 iframe이 페이지
$("#iframe_wrapper").each(function(){
$.ajax({
type: "post",
url: "http://site.com",
data: { action: 'get_the_iframe' },
context: this,
success: function(html){
$(this).html(html);
$(this).show();
$('#theiframe').load(function(){
// do stuff with the iframe...
});
}
});
});
iframe이가 호출되는 함수 내부에있는 경우 $ _POST [ '행동' ] 'get_the_iframe'입니다 : iframe이 페이지에 전체 내용을 표시하기 전에로드를 기다립니다처럼
<iframe id="theiframe" name="theiframe" src="http://site.com/page/"></iframe>
작동하지만, 문제는 브라우저가 정말 느린 전체 페이지를 표시 할 것 같다, 그것은 보인다 그것은 물마루 아약스가 완료 되었기 때문에 일어나지 않아야합니다. 이것은 정확히 내가 피하려고했던 것입니다 ...
어떤 아이디어가 잘못 되었습니까?