chrome: disable internet connection or work offline - google-chrome

How can I disable internet connection or work offline like Firefox in Chrome? I need to check some errors when Internet is not available.

offline mode is added to Chrome v45.
Developer tools -> Network tab -> Choose "offline" from selectbox.

Offline switcher is a new handy Chrome Extension to do the job quickly. You can toogle to switch between offline and online mode.
The add-on is simple, just to set Chrome proxy to an un-existing point.

Under the network tab, go to the THrottling dropdown where you can select different speeds of web and even set it to be offline. This comes very handy when you are working with service workers and want to test your application in offline mode.
Refer to the latest answer:
https://stackoverflow.com/a/32607960/2520254

Until Chrome has a feature to disable internet but retains localhost (or local network) connections. The only way I could suggest is to just disconnect the network from the internet manually for your testing.

Related

Fiddler capturing traffic from a specific process stopped working in Chrome

Open Chrome and navigate to google.com
In Fiddler use the "Any Process" button to select that Chrome tab
In Fiddler the "Any Process" button changes to something like "chrome: 11788"
In the Chrome tab search for something
I expect traffic to be captured by Fiddler but no sessions are displayed. If I use "Any Process", traffic is captured from all applications.
The "Use Filters" checkbox is unchecked in the Filters tab.
I uninstalled and reinstalled Fiddler.
I have the latest version installed.
What else could I do?
Modern versions of Google Chrome use separate process for making requests; so the process of the main window, detected by the 'Any Process' tool, is different.
The team is considering a fix, but it is currently not implemented, see "Target Any Process" feature no longer working with Chrome.
Possible workarounds meanwhile are:
Use other filtering functionality - e.g. capture a request from Chrome, and from the Sessions view choose right click -> Filter now -> Show only process=<process number>.
Filter everything else. In Fiddler, uncheck Tools -> Options -> Connections -> Act as system proxy on startup. Then Start Chrome with manually specified proxy settings, pointing to the port on which Fiddler is listening:
chrome --proxy-server=http://localhost:8888
This way the only captured traffic will be from this instance of Chrome.
Detailed version: Why Fiddler's Process Picker tool doesn't work with Chrome anymore
Brief version: For security and performance reasons Chrome now handles network requests through a separate network service. So when you are pointing the 'Any Process' tool of Fiddler on any Chrome window/tab, you are actually pointing to the UI (browser process) of Chrome browser.
There is one quick workaround for this:
Navigate to chrome://flags/#network-service-in-process in your Chrome browser. You would see Runs network service in-process and its value would be set to Default.
Change the value from Default to Enabled. By doing this you are telling Chrome to handle network requests from the browser process which also handles the UI.
Restart Chrome. You should now be able to capture network requests by pointing the Any Process tool on any Chrome tab.
Once you are done with your development activities do not forget to set the flag back to Default. This would give better performance.
NOTE: At the point of writing this, I am using Chrome 84.

Charles proxy not working with Chrome

I am working on Mac and have identical Proxy settings for the System and Firefox browser. However, I am able to see my Firefox traffic in Chrales but I don't see my Chrome and Safari traffic (which use System Proxy Settings). What do I need to do? How can I check the debug this?
Already restarted my browser but it didn't help. I have set and reset proxy settings, but of no use.
One thing to note: I am on a VPN although I don't think this should affect Chrome as Firefox is going through the proxy.
For anyone else using VPN: Charles must be turned on before VPN. So quitting VPN after turning on Charles won't work either.
Also in my case VPN can't be turned on at all.
Did you enable "Proxy-> Mac OS X Proxy"?
Quit your VPN! I was confused almost one year and really upset, i cannot record on my mac.But today i quit my vpn(xx-net) it does works.
Just got caught out with this - the Hola VPN Chrome extension was managing Chrome's proxy settings so it wasn't using the system proxy.
Simply disabling the Hola extension got it working for me again.
I turn off a chrome proxy plugin and it works!
Chrome extension 'SwitchyOmega' can solve the "VPN and Charles cannot turn on at the same time" issue by configure the auto switch option:
Add Charles mode
Add VPN mode
auto switch configuration
Use auto switch mode in Chrome
Desktop applications that set system-wide proxy don't work really well with VPN. I struggled with Charles & Fiddler because I was under a VPN network and almost all the time I couldn't use any of the apps while on my company VPN So I googled for Web Proxy chrome extension and found Requestly.
I am using the Requestly Chrome extension and the chrome extension works well with VPN and it has all the features that Charles has.

Ripple emulator chrome plugin is taking long time to execute

I was using Ripple Chrome extension for test running my phonegap apps, and I did all settings for Ripple, like making a Chrome shortcut with --allow-file-access-from-files and in Chrome extension list checking "allow local file access" for Ripple.
On running my HTML file which I made for phonegap build, Chrome is taking a good time to deliver a response. Everything is working, the only issue is the delay on response.
I tried on another desktop, and there it is quiet and fast. I re-installed the extension and restarted Chrome and OS a couple of times to no effect.
For your information, I had similar issues when using Chrome. Make sure Chrome isn't running in the background when you close it. Since a few versions of Chrome, this is enabled by default. Check your taskbar to see if this is the case.
If Chrome is indeed running in the background, right-click on the chrome-icon in the taskbar and disable "running in background". This worked for me and now Ripple fires superfast.
You probably need to confirm your system spec. development workstations are known to be resource demanding, particularly the RAM, and processors. if your app was faster on another system, you might want to check that system's spec also and compare with yours.

Is there any network tab with ie8 developer tool? If not then how to track network traffic in ie8 browser?

How can I use IE8 Developer Tools to inspect network traffic?
Actually I need to test if files have loaded or if any errors occurred during page load .ln Firefox/Firebug I can do this by using the NET tab.
Internet Explorer 8 doesn't support network statistics in its developer tools. You'll need to upgrade to Internet Explorer 9 or use a third-party tool like Fiddler to inspect traffic.

Chrome Web Inspector Web Socket Debugging

I can use the Network tab in the Google Chrome Web Inspector to debug the network traffic (AJAX requests, etc.). I can check what data is transferred easily. But Websocket connections only show as
Request URL:ws://localhost/...
Request Method:GET
Status Code:101 Switching Protocols
...
and I can't see the transferred data. Is there any build in feature in Google Chrome to inspect the transferred data? Or do I need to use Wireshark?
PS: I'm using the latest stable version (16.0.912.75). If a newer version (beta/dev) has this features, it would be nice.
Chrome and Chromium now have WebSocket message frame inspection. Here are the steps to test it quickly:
Navigate to the WebSocket Echo demo, hosted on the websocket.org site.
Turn on the Chrome Developer Tools.
Click Network, enable filter (3rd icon from the left on the top of Dev Tools) to filter the traffic shown by the Developer Tools, and click WebSockets.
In the Echo demo, click Connect. On the Headers tab in Google Dev Tool you can inspect the WebSocket handshake.
Click the Send button in the Echo demo.
To see the WebSocket frames in Chrome Developer Tools, under Name, click the entry representing your WebSocket connection. This refreshes the main panel on the right and makes the WebSocket Frames tab show up with the actual WebSocket message content.
I also posted the steps with screen shots and video.
After some more research I found a duplicate question here: Debugging WebSocket in Google Chrome
Chrome does't support viewing the traffic in the current stable version. I need to use Wireshark.
Another Idea, for simple web socket testing and lightweight, use Chrome plugin "Simple Web-socket. I wanted to check only if the connection can be establish or not. Following Chrome plugin "Simple Web-socket (link : https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo?hl=en)" work like charm. See image.
https://lh3.googleusercontent.com/bEHoKg3ijfjaE8-RWTONDBZolc3tP2mLbyWanolCfLmpTHUyYPMSD5I4hKBfi81D2hVpVH_BfQ=w640-h400-e365