스키마(http, https)에 따른 상대적인 주소 처리
<img src="//sub.l2j.co.kr/image/ssl.jpg" />
프로토콜을 확인후 리로딩
<script type="text/javascript">
if (window.location.protocol != "https:")
//window.location.href = "https:" + window.location.href.substring(window.location.protocol.length);
location.href = location.href.replace(/^http:/, 'https:')
</script>
엘리펀 웹사이트(https://elefuns100.cafe24.com)에 적용됨 : inc/header.php
'jQuery' 카테고리의 다른 글
[jQuery] display 여부에 따라 show, hide (0) | 2018.02.01 |
---|---|
[jQuery] Request Parameter 받기 (0) | 2018.01.10 |
[jQuery] 텍스트/문자열 변경 및 검색 - indexOf, match 함수, replace 함수, split 함수, html(),text(),val() 메소드 (0) | 2017.12.19 |
[jQuery] each, hasClass (0) | 2017.12.19 |
[jQuery] 페이지 링크값 변경 - prop() 메소드, removeAttr 메소드 (0) | 2017.12.19 |