Static resource loading failure
When I visit Github, the profile picture fails to be loaded and the page layout sometimes fails. When I open the console, STATIC resources under the github secondary domain name fail to be loaded.
Because browsers have a limit on the number of concurrent HTTP requests, they can block if the number of requests exceeds the limit. The Chrome browser allows up to six TCP connections to the same domain name. Github allows static resources to be placed under multiple secondary domain names.
What could go wrong
- DNS is polluted. The local DNS configuration is incorrect
- The IP address of the Github domain name is changed
The solution
The solution is to change the DNS configuration of github’s static resource domain name in the hosts file. Complete the following steps
1. Open the terminal and edit the host file
MacOs systems
sudo vim /etc/hosts
Copy the code
Windows system
Find the file C:\Windows\System32\drivers\etc\hosts
2. Configure DNS
If the host has been configured in the past, you can comment it out and skip step 2 to refresh the DNS. If it does not take effect, use the DNS query tool to query the current configuration of the fastest IP address.
DNS Query tool
- DNS query
- ipaddress.com
- ipaddress.com
192.30.253.119 gist.github.com 151.101.100.133 assets-cdn.github.com 151.101.100.133 151.101.100.133 151.101.100.133 gist.githubusercontent.com raw.githubusercontent.com Cloud.githubusercontent.com 151.101.100.133 151.101.100.133 camo.githubusercontent.com avatars0.githubusercontent.com 151.101.100.133 151.101.100.133 151.101.100.133 avatars2.githubusercontent.com avatars1.githubusercontent.com Avatars3.githubusercontent.com 151.101.100.133 151.101.100.133 at avatars4.githubusercontent.com Avatars5.githubusercontent.com 151.101.100.133 151.101.100.133 at avatars6.githubusercontent.com Avatars7.githubusercontent.com 151.101.100.133 avatars8.githubusercontent.com # making EndCopy the code
Refresh the MAC DNS cache
MacOs systems
sudo killall -HUP mDNSResponder
Copy the code
Windows system
ipconfig /flushdns
Copy the code
After refreshing the cache, open the page to refresh. The problem was solved perfectly
Github website cannot load
Github.com DNS may be corrupted. The solution is the same as above.