Uncaught SecurityError: Failed to execute ‘replaceState’ on ‘History’: cannot be created in a document with origin ‘null’

Add this: <script> $(document).bind(‘mobileinit’,function(){ $.mobile.changePage.defaults.changeHash = false; $.mobile.hashListeningEnabled = false; $.mobile.pushStateEnabled = false; }); </script> Just before jquery.mobile-1.4.5.min.js That works with Android WebViewClient and Chrome on Windows.

window.innerWidth in Chrome’s device mode

window.innerWidth and innerHeight return the dimensions of the visual viewport. In desktop browsers, this is generally the browser’s window dimensions. On mobile the situation is a bit more complicated because of pinch zoom. When you load a page without a <meta name=”viewport”> tag, a default layout width is used (e.g. Chrome uses 980px). When the … Read more

Chrome – Debug Angular/Typescript – how to navigate to ts file

Angular uses webpack and all type script files are listed under it. To select your target typescript file, Chrome’s Developer tool (F12). Go to Source tab, Select Chrome “webpack://”->”src/app” -> your typescript file. Or in older version of chrome follow this path “webpack://”->”.”->”src/app” -> your typescript file ( See the image file). Or Ctrl+P to … Read more

Visual Studio Code debugger with Chrome refused to connect to localhost

If anyone else is having this issue, I solved it by: 1)installing the ritwickdey/vscode-live-server available here: vscode-live-server link 2) restarting vscode 3) clicking the Go Live button at the bottom of the screen 4) getting the server address from the resulting Chrome window (ex: http://localhost:5500/) 5) changing the .vscode/launch.json file to include that server address: … Read more

Is there a Google Chrome-only CSS hack? [closed]

Sure is: @media screen and (-webkit-min-device-pixel-ratio:0) { #element { properties:value; } } And a little fiddle to see it in action – http://jsfiddle.net/Hey7J/ Must add tho… this is generally bad practice, you shouldn’t really be at the point where you start to need individual browser hacks to make you CSS work. Try using reset style … Read more

Defer Attribute (Chrome)

What do defer and async mean? By default, a <script src=…></script> tag is evil! The browser must halt parsing the HTML until the script is downloaded and executed (since the script might call document.write(…) or define global variables that later scripts depend on). This means that any images and stylesheets that are after the script … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)