I recently encountered a strange scenario where I had to simulate as if my browser is not connected to the internet, yet I had to connect to a specific website. Weird right! However there was a thoughtful reason behind this. I wanted to know if that particular website is loading resources from any third parties. This is a common scenario, usually websites load some resources such as fonts, images, stylesheets and javascript libraries from third party servers also sometimes called CDN (Content Delivery Network) Servers. So if the browser only allows loading resources from one server and blocks others, I should be able to see which resources were not loaded using the Chrome Developer Tools.
Now, obviously I cannot disconnect the Internet since I still have to load a single website. So I stumbled upon a Google Chrome Extension called Website Whitelist.
Website Whitelist is a free extension in Chrome Web Store and it does exactly what its name says. It maintains a whitelist of websites that you want to use and block all others by default.
How to Use it
- Install this extension
- Open a website that you want to allow for example: Google.com
In this case you should see the following dialog in the chrome tab
- Click on the radio button with the website name in this case .google.com and then click on the button Whitelist Selected.
Now you should see the following dialog that acknowledges that the website has been whitelisted successfully.
- Click on the link provided and you should be able to visit the website as normal.
- If you try to open any other website at this point you should receive the same dialog as shown in the first image.
Happy surfing!