DanKim0213 / Today-I-Learned

Today I Learned
1 stars 0 forks source link

Web #18

Open DanKim0213 opened 1 year ago

DanKim0213 commented 1 year ago

Web

Whatever relates to Web!

DanKim0213 commented 1 year ago

Responsive Design

DanKim0213 commented 1 year ago

SSE(server-sent event) vs web socket

what is the difference between Server-sent Event and Web socket api?

"WebSocket is a technology that enables two-way realtime communication between client and server. In contrast, Socket.IO is a library that provides an abstraction layer on top of WebSockets, making it easier to create realtime applications." by link

Furthermore

DanKim0213 commented 1 year ago

What happens when you type a URL into your browser?

Furthermore

DanKim0213 commented 1 year ago

CORS

DanKim0213 commented 11 months ago

Learn Image

https://web.dev/learn/images https://css-tricks.com/a-guide-to-the-responsive-images-syntax-in-html/ https://www.freecodecamp.org/news/time-saving-css-techniques-to-create-responsive-images-ebb1e84f90d5/

DanKim0213 commented 10 months ago

How we improve performance

The more stuff you can do asynchronously, the better advantage your app can take of multicore processors.

https://developer.mozilla.org/en-US/docs/Web/Performance/How_long_is_too_long https://developer.mozilla.org/en-US/docs/Learn/Performance/Measuring_performance https://developer.mozilla.org/en-US/docs/Web/Performance/Fundamentals https://developer.mozilla.org/en-US/docs/Web/Performance/Optimizing_startup_performance https://web.dev/learn/performance https://developer.mozilla.org/en-US/docs/Learn/Performance/Perceived_performance https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decode

How long is too long (goal)

async vs defer attribute on <script></script https://javascript.info/script-async-defer

the browser must wait for the script to download, execute the downloaded script, and only then can it process the rest of the page. That leads to two important issues:

  1. Scripts can’t see DOM elements below them, so they can’t add handlers etc.
  2. If there’s a bulky script at the top of the page, it “blocks the page”. Users can’t see the page content till it downloads and runs:

In practice, defer is used for scripts that need the whole DOM and/or their relative execution order is important. And async is used for independent scripts, like counters or ads. And their relative execution order does not matter.

DanKim0213 commented 10 months ago

Intersection Observer

DanKim0213 commented 7 months ago

Internationalization-framework

DanKim0213 commented 7 months ago

Event Delegation

https://github.com/javascript-tutorial/en.javascript.info/blob/master/2-ui/2-events/03-event-delegation/article.md

Capturing and bubbling allow us to implement one of the most powerful event handling patterns called event delegation.