ERR_CONNECTION_REFUSED

Website suddenly no longer showing anything?
Might be a DNS cache problem!

How to clear the DNS cache on your computer

This article describes how to clear the DNS cache on your computer.

Many computer operating systems use caching to store DNS lookup results. Normally this is not a problem, and accelerates network performance. However, when you are developing a web site or configuring domain settings, your computer’s DNS cache can get in the way, preventing you from accessing the correct site.

To clear the DNS cache, follow the appropriate procedure below for your computer’s operating system or web browser.

Windows operating systems

To clear the DNS cache on Microsoft Windows, follow these steps:

  1. Open a DOS command window. To do this, click Start, click Run, type cmd, and then press Enter.
  2. At the command prompt, type the following command and then press Enter:
    ipconfig /flushdns
  3. The DNS cache is now clear.

Mac OS X operating systems

To clear the DNS cache on Apple Mac OS X, follow these steps:

  1. Open a terminal window. To do this, click Applications, click Utilities, and then click Terminal.
  2. At the command prompt, type the appropriate command for your Mac OS X version to clear the cache:
    • For OS X Yosemite v10.10.4 or later, type the following command:
      sudo killall -HUP mDNSResponder
    • For OS X Yosemite v10.10 through v10.10.3, type the following command:
      sudo discoveryutil mdnsflushcache
    • For OS X Mavericks, Mountain Lion, and Lion, type the following command:
      sudo killall -HUP mDNSResponder
    • For Mac OS X Snow Leopard, type the following command:
      sudo dscacheutil -flushcache
  3. The DNS cache is now clear.

Linux operating systems

Many Linux distributions do not use DNS caching at the operating system level. Instead, applications (such as web browsers) maintain their own internal caches. To clear an application’s DNS cache, often all you need to do is restart the application.

If your Linux computer does use a DNS caching service, however, consult its documentation for instructions about how to clear the cache.

Google Chrome browser

The Google Chrome web browser maintains its own internal DNS cache. To clear it, follow these steps:

  1. Start Google Chrome.
  2. In the address bar, type chrome://net-internals/#dns
    Google Chrome displays a list of hosts in its internal DNS cache.
  3. Click Clear host cache.
  4. In the address bar, type chrome://net-internals/#sockets
  5. Click Close idle sockets, and then click Flush socket pools.

WordPress Auto Logout

When you click on the “Remember Me” option on the login page of your WordPress website, it will keep you logged in for 2 weeks. If you don’t, it will keep your login active for 2 days. However, you can extend the auto logout period in WordPress by adding a little code snippet. Keep in mind that it will affect site’s security by keeping user logged in for too long.

function keep_me_logged_in_for_1_year($expirein) {
return 31536000; // one year in seconds
}
add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );

The above code will keep your authentication cookie for a year.

Have a nice day!

Dartbord Oche distances

The sport originates from the UK, so all measurements are in feet and inches. Let’s convert these correctly.

1 foot = 12 inch, 1 inch = 25,4 mm.

From the floor to the center of the Bull’s Eye:
5 feet. 8 inches = 68 inches = 1727,2 mm

From the front of the dartboard to the Oche / throwing line:
7 feet 9 1/4 inches = 93,25 inches = 2368,55 mm

Most websites will mention 1,73m and 2,37m, but as you can see this is not quite right.
Now, let’s add some math:

As good old Pythagoras says: “a2 + b2 = c2”, so:

5610029,1025 + 2983219,84 = 8593248,9425 and get the square root from this last one gives us:

2931,424387989566 !

So, our bullseye – oche distance should be 293,14 cm long to test the measurement diagonally.

The more you know…
Have a nice day!

Basic HTML

Dana Sallow wrote me a note:

“Hello – I read your page markohoven.com/2020/05/15/css-stylesheet-selectors/ and have two words: incredibly useful! I loved the HTML-related resources you mention there. I shared your post with a co-worker, and he shared with me a very helpful guide on how to use HTML. https://www.websiteplanet.com/blog/html-guide-beginners/ Since your readers might need this for either their work or personal life, I do believe they’ll find it useful if you add it to your page. Thanks again for the resource! Best, Dana.”
So here it is:

Continue reading Basic HTML

Forget NAS login

Connected to a NAS, like Synology SMB Service, and clicked ‘remember my credentials’? Sure, that makes it easy whenever you want to go back to that same shared folder, but now what happens if you want to connect using a different user, with different rights to the share?
You would have to remove the exisiting connection first, and make sure Windows 11 forgets how to connect to that Server/NAS/Share. So what do you do?

  1. In your Windows Start menu, search for “Credential Manager”.
  2. In the “Windows Credentials” section, remove any stored credentials referencing the share, network drives or similar:
  3. Open the details with the ‘arrow down’ and click “Remove”.
  4. Repeat these steps until you remove all of the credentials associated with the NAS.

Now you can reconnect to your share and use the correct login.
Have a nice day!