06 2023 档案
摘要:A: Cannot tell, it might be GET request then it's not a preflight request B: Correct C: Not correct D: Preflight request will have 600ms cache time, n
阅读全文
摘要:Those css properties will promot to a new layer
阅读全文
摘要:The "Strict-Transport-Security" (STS) header is a security feature implemented by web servers to enforce the use of HTTPS (HTTP Secure) connections fo
阅读全文
摘要:Answer: All correct HTTP1.0: Each network connection needs TCP, not so efficient HTTP1.1: One network connection can have multi request/response in se
阅读全文
摘要:What this refer to? function regularFunction() { this // Global scope } const obj = { regularFunction() { this // The object on which the method is ca
阅读全文
摘要:Once run in async await, the rest of the function body will be push to Microtask Queue console.log(3) Order: 2 3 4 1
阅读全文
摘要:We only want to access <li>One</li> B: '+' sinbling selector, if we don't have second uland replaced with a li, then it is targeting this li; which is
阅读全文
摘要:A: Wrong. You should be able to access sub-domain B: Wrong, HttpOnlyCookie can only be set from server side. Securemeans https only; C: Correct. If yo
阅读全文
摘要:font-display: auto; font-display: block; font-display: swap; font-display: fallback; font-display: optional; auto The font display strategy is defined
阅读全文
摘要:XSS (Cross-Site Scripting): XSS is a type of injection security vulnerability where malicious scripts are injected into trusted websites. These script
阅读全文
摘要:Blog: https://web.dev/bfcache/ bfcache is an in-memory cache that stores a complete snapshot of a page (including the JavaScript heap) as the user is
阅读全文
摘要:Morden browser apply noopenerfor you, but for lagacy browser might not. What noopenerdoes is that, it set window.openerto null, which can prevent evil
阅读全文
摘要:default-src "none"; script-src "self"; img-src "self" example.com; style-src fonts.googleapis.com; font-src fonts.gstatic.com; <script src="/js/app.js
阅读全文
摘要:1. Time To First Byte (TTFB): This is a measurement of the responsiveness of a web server. It is the time it takes from the user or client making an H
阅读全文
摘要:So higher rank css will override lower rank css rules. Inline styles will override any other css rules. h1:not(.small-text) // 0011 - :not is not coun
阅读全文
摘要:What gets logged when clicking button? <div id="outer"> <div id="inner"> <button id="btn">Click me!</button> </div> </div> const outer = document.getE
阅读全文
摘要:TypeScript 5.2 will introduce a new keyword - 'using' - that you can use to dispose of anything with a Symbol.dispose function when it leaves scope. T
阅读全文
摘要:Layout: This step invovles determining the geometry of the page. The browser calculates where each element will be on the screen, considering factors
阅读全文
摘要:JavaScript, the programming language of the web, is often praised for its ability to handle memory management automatically. The JavaScript engine's g
阅读全文
摘要:no-cache: validate cache as the latest one before using it. This means that a cache should not serve a stored copy of the response without validating
阅读全文
摘要:https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming DNS domainLookupStart domainLookupEnd TCP / TLS connectStart secureConnec
阅读全文
摘要:Recurisive DNS Resolver: This is the first stop in the DNS query process. When you type a URL into your browser, the request first goes to the recursi
阅读全文
摘要:Command Line 1. Navigate to your home directory cd ~ 2. Make a directory call "temp" mkdir temp 3. Move into temp cd temp 4. List the idrectory conten
阅读全文
摘要:DOM (Documnet Object Model) Tree: When a web page is loaded, the browser reads the HTML and builds the DOM tree. The DOM is a tree-like structure that
阅读全文
摘要:normal script, without async defer: Script fetched and executed immediately, before browser continues parsing the page (It stops HTML parsing). If the
阅读全文
摘要:button.addEventListener( 'click', (event) => { console.log('listener 1') queueMicrotask(() => { console.log('microtask') }) } ) button.addEventListene
阅读全文
摘要:You can use getEventListeners(button)directly inside chrome devtool, but not inside application code. You can use monitorEvents(button, 'keydown'), no
阅读全文