TiL
-
28. Server Sent Event (SSE)Java Script & Type Script 2023. 2. 18. 17:52
SSE-Server Sent Event 서버에서 클라이언트로 데이터를 보내는 단방향 통신 실시간 알림을 구현하며 백엔드분께서 웹소켓 대신 제안하신 SSE! 실시간 채팅과같이 양방향통신이 필요없기 때문에 데이터가 무거워지는 웹소켓보단 SSE를 써보자는 의견이었다. SSE는 별도의 프로토콜 없이 HTTP 프로토콜만으로 사용 가능하고 훨씬 가볍다. Event Source 서버와 클라이언트 간 SSE 통신을 하려면 처음에 클라이언트에서 서버로 연결 요청을 보내야 한다. EventSource는 SSE 연결 요청을 보내기 위해 JavaScript가 제공하는 객체이며, SSE Client API는 EventSource 객체에 포함된다. 이벤트 핸들러 EventSource.onopen : 서버와 연결이 open되었을 ..
-
5. 항해99 개강Day1 Today I learned (HTML,CSS)항해99 2022. 12. 5. 15:52
스파르타 코딩클럽 항해99 Day1 웹개발종합강의 - 두번째 학습 오늘 복습한 내용 HTML와 CSS 기초, 부트스트랩 활용방법, Javascript 기초 문법과 함수 개념, Jquery개념과 API를 이용한 Ajax 연습하기 오늘은 1,2주차 강의 전체를 다시 돌려봤다. HTML이랑 CSS 기본 뼈대세우기를 다시 전체적으로 복습하다보니, 첫번째 학습에서 내가 중요하다 생각하지 못해 놓친 부분이 많았다. 기초적인 내용을 미처 이해하지 못해 코드를 작성하며 이건 왜 이렇게 작동하는거지? 하는 고민을 많이 했었다. 다시 천천히 강의를 꼼꼼히 공부해보니 새롭게 깨닫는 점이 많았다. .... 특히 let temp_html = `` 이렇게 비워놓는 이유가 뭐지? 했었는데, 위에 temp_html을 ``로 지정해두..