美文网首页
优化Github页面加载速度

优化Github页面加载速度

作者: Java_Pro | 来源:发表于2021-01-22 20:01 被阅读0次

    优化Github页面加载速度

    下述步骤操作看完就可以自己试着哪里慢优化哪里

    修复Github网页图片加载不出来

    如下图,图片应该是404了


    图片加载失败

    解决方案

    第一步

    访问 https://githubusercontent.com.ipaddress.com/raw.githubusercontent.com

    获取最快ip地址
    记住上图的ip地址

    第二步

    # GitHub Start
    199.232.96.133 avatars0.githubusercontent.com
    199.232.96.133 avatars1.githubusercontent.com
    199.232.96.133 avatars2.githubusercontent.com
    199.232.96.133 avatars3.githubusercontent.com
    199.232.96.133 avatars4.githubusercontent.com
    199.232.96.133 avatars5.githubusercontent.com
    199.232.96.133 avatars6.githubusercontent.com
    199.232.96.133 avatars7.githubusercontent.com
    199.232.96.133 avatars8.githubusercontent.com
    199.232.96.133 camo.githubusercontent.com
    199.232.96.133 cloud.githubusercontent.com
    199.232.96.133 gist.githubusercontent.com
    199.232.96.133 marketplace-screenshots.githubusercontent.com
    199.232.96.133 raw.githubusercontent.com
    199.232.96.133 repository-images.githubusercontent.com
    199.232.96.133 user-images.githubusercontent.com
    199.232.96.133 avatars.githubusercontent.com
    # GitHub End
    

    把上面的ip地址全换成刚刚第一步红框中的ip

    第三步

    下载一个便捷修改hosts的工具
    访问 https://github.com/oldj/SwitchHosts/releases

    这里我们下载安装版

    这里我们下载安装版,就是上面红框里的
    下载完成后,以管理员方式打开后
    把上面的第二步的替换后的写入进去即可

    hosts修改软件界面

    测试

    在这里插入图片描述

    举一反三

    后面再碰到github哪个链接404就把对应的这个地址写在hosts,使用查出来的ip做代理就行了


    在这里插入图片描述

    相关文章

      网友评论

          本文标题:优化Github页面加载速度

          本文链接:https://www.haomeiwen.com/subject/faeezktx.html