sessionStorage/localStorage scope

Firstly, localStorage and sessionStorage are 2 objects on the window object. They tie to the origin of the current window. As a result they are bind to : protocol, http/https are different domain subdomain can share with parent by manually setting document.domain. xxx.capitalone.com cannot share with yyy.capitalone.com port Same thing apply to 302 redirect. The session/local storage value…

Fighting with browser popup block

Background Recently in our project, we have a need of refactoring some old struct actions to rest based pages. This way we avoid multiple page navigation for our user so that all the stuff can be done in a single page. One example is file download. Previously in the struts based app, if a page have 12…

understand CORS

My colleague told me that there is a chrome extension enables you do cross domain request for all sites. Was a bit surprised since my previous understanding was CORS is controlled from the server side with some control headers. So I decided to dig more to it. After reading wiki,  and some Chinese article, I think…

how browser render a page with html/css/js

Basic steps: 1. DNS get the IP. Then send http/s request to the server to fetch the page content. 2. On getting the content, download the resources(css/js/images) and try to render it. Note: the render process would not begin before css is all downloaded since it does not make sense to render something without konwing…

gwt browser interaction

First, the user enters the URL of your application, which triggers the browser to request the application’s HTML file. The HTML downloads a specifically named nocache.js file—the so-called bootstrap file. The bootstrap code determines which specific permutation of your application in JavaScript is required and then requests it. When the permutation is loaded, the bootstrap calls…

What happens when you type a web page address in the address bar

Your browser, if it doesn’t already know, will ask your OS’s DNS system what the address (IP address) of the host (“www.google.com,” for example) is. If your OS doesn’t know, it will query third-party DNS servers (those of your ISP, for example). Once an address is obtained, your web browser establishes a TCP/IP socket connection,…

How session works

Basic ideas When server creates a new session, it always adds a session identifier in the form of cookie. When web browser asks for a page or makes a request, the web browser always sends cookie which are created by the web server in the request. Therefore in the server side, web server checks for…