xml 혹은 서버사이드에서 데이터를 받을때
브라우저에서 리프레시가 안되는 경우가 많다.
이 문제는 사용자의 익스 브라우저의 경우 임시 인터넷 파일이 '페이지 열때마다' 가 아니기 때문이다.
보통은 난수를 주소뒤에 붙여 해결하곤 한다. abdl.asp?unique=난수 등의 방법.
물론 나도 그렇게 했다.
하지만 이런방식을 쓰면 뭔가 찝찝한 기분을 떨칠수가 없다.
이때 헤더를 추가하여 페이지가 갱신되도록 브라우저에 알려주는 방법이 있다.
HTML인 경우
<META http-equiv="Expires" content="-1">
<META http-equiv="Pragma" content="no-cache">
<META http-equiv="Cache-Control" content="No-Cache">
ASP인 경우
<%
Response.Expires = 0
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "Cache-Control","no-cache,must-revalidate"
%>
JSP인 경우
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires",0);
if (request.getProtocol().equals("HTTP/1.1"))
response.setHeader("Cache-Control", "no-cache");
%>
PHP인 경우
<?
header("Pragma: no-cache");
header("Cache-Control: no-cache,must-revalidate");
?>
'ActionScript > Tip' 카테고리의 다른 글
흔한 SWC 를 이용한 폰트 embed 팁 (0) | 2011.08.16 |
---|---|
티스토리 블로그와 플래시. 그리고 externalInterface 오류. (7) | 2011.03.06 |
플래시에서의 비트맵의 모든것 & 그룹으로 모션 (0) | 2008.03.24 |
SWF파일 캐시 방지법 (0) | 2008.03.24 |
플래시 게시판 연동 (0) | 2008.03.24 |