About the StackOverflow website visit too slow problem

Source: Internet
Author: User

It was too slow to visit the StackOverflow website, although it has been used for more than a year, but each visit will have to wait a few minutes. I can't stand it recently, just search for a solution. Previously thought is StackOverflow site was wall, did not think or because the reference to Google's JS file so the visit too slow. Okay, we'll do it when we know the problem.

Visit https://tampermonkey.net/This site to download a plugin

This address is Google's so useless!!! Visit this address download (Micro Cloud): Https://share.weiyun.com/5nFalgR

Prompts to install the extension after the download is complete

Google browser words need to open the developer mode in the expansion program to be prompted

There is a small eye icon in the upper right corner of the browser after the addition is complete this is the extension program just installed

The next step is to write a script that replaces the original Google jquery reference.

Click the extension program to add a new script

Put this piece of code into

//==userscript==//@name Googlejsreplace//@namespace https://stackoverflow.com///@version 0.1//@description try to take over the world!//@author You//@match https://stackoverflow.com///@grant None//==/userscript==(function() {    ' Use strict '; functioncreatescriptelement (file) {varJselm = document.createelement ("Script"); JSELM.SRC=file; returnJselm; }    functionreplacegooglescripts () {varScripts = Document.queryselectorall (' script '); Scripts.foreach (function(script) {varmatches = Script.src.match (/jquery\/([\d\.] +) \/jquery.min.js/); if(matches) {varVersion = Matches[1]; varNEWSRC = ' https://cdn.bootcss.com/jquery/' + version + '/jquery.min.js ';                Console.log (script);                Script.parentNode.replaceChild (Createscriptelement (NEWSRC), script); Console.log (' replaced Google jquery with ' +newsrc);    }        }); } replacegooglescripts ();}) ();
View Code

Now modify the settings load location modified to Document-start user match modified to: https://stackoverflow.com/

and then save

Detailed above steps: 1190000015588174

Now visit https://stackoverflow.com/website find still very slow view HTML discovery Google's JS reference is gone

However, we found that this JS was loaded during the visit.

Now modify the Hosts file

Address in: C:\Windows\System32\drivers\etc

Map Google's DNS address to a local

Now access https://stackoverflow.com/because it maps Google's JSIP address to the local, all can not find the direct 404 will not wait

About the StackOverflow website visit too slow problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.