What is the purpose of atob and btoa method?
“Window” object provides two methods for handling String and Base 64 encoded string. window.btoa() This method is for converting a normal string to Bas64 encodes string. b(Binary string) to a(Ascii base64 string). Example, var bas64string = window.btoa('Sandeep');alert(bas64string);//output U2FuZGVlcA== window.atob() This method is for converting Base64 Ascii string to normal string. a(Ascii base64 string) to b(Binary […]
what is CORS ?
CORS stands for Cross Origin Resource Sharing. This is W3C specification about Cross Domain Ajax Requests in Web2.0. The headers for allowing CORS are:- Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, POST, PUT, DELETE Access-Control-Allow-Headers: Authorization Jul 24, 2013Sandeep
what is Chain of Responsibility Design Pattern?
Chain of response yet another popular pattern that can be used in the situation where :- Initial configuration takes more time. Same type of request comes for many time to process. Example, — Printer is perfect real time example for these above scenario. — Printer needs significant amount of […]
What is browser reflow ?
Browser’ reflow is the time taken by the browser to calculate the DOM element position.Generally re-flow occurs when a DOM Element is modified or added by JavaScript or CSS. Some points on Reflows are :- Reflow involves page Layout computation. Nested DOM elements increases Reflow time. Filter Expression in CSS can increase Reflow time. Animation […]