随笔分类 - [Whole Web]
摘要:Solution 1: consider change font-size to 16px or above Soution 2: using javascript if(navigator.userAgent.indexOf('iPhone') > -1 ) { document .querySe
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:XSS (Cross-Site Scripting): XSS is a type of injection security vulnerability where malicious scripts are injected into trusted websites. These script
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:interface EnemyAttacker { fireWeapon(): void; driveForward(): void; assignDriver(driverName: string): void; } // Target class EnemyTank implements Ene
阅读全文
摘要:Check the adapter pattern https://www.tutorialspoint.com/design_pattern/adapter_pattern.htm Client: Call the common entry public class AdapterPatternD
阅读全文
摘要:The optimizing compiler optimizes for what it’s seen. If it sees something new, that’s problematic. Seleting properties has some strange implications
阅读全文
摘要:Reuse existing instances when working with identical objects The flyweight pattern is useful when you're creating a huge number of objects, which coul
阅读全文
摘要:Source: https://javascriptpatterns.vercel.app/patterns/performance-patterns/browser-hints Prefetch The `prefetch` browser hint can be used to fetch re
阅读全文
摘要:Yarn workspace Add following lines to the package.json file "workspaces": [ "packages/*" ] And create folder call packages in the root folder. Somethi
阅读全文