GithubHelp home page GithubHelp logo

gandalftheblue's Introduction

gandalftheblue's People

Contributors

gandalftheblue avatar

Watchers

 avatar  avatar

gandalftheblue's Issues

在 MAC 上用 SUDO 启动 IDEA

由于项目用到443端口,用 IDEA 启动的时候显示 permission denied。
这个时候我们需要用 ROOT 权限来启动 IDEA。其中一个方法就是在命令行用 SUDO 启动 IDEA:

sudo /Applications/IntelliJ IDEA CE.app/Contents/MacOS/idea

由于是开发环境,所以不会有安全方面的问题。

React 在IE11下F5刷新404 error

最近发现一个奇怪的问题,React项目在IE上刷新的时候会出现404错误。
image

项目背景:
1, 利用 create react app 构建
2, 部署在tomcat上
3, 采用client-side 路由

由于是客户端路由,我们在tomcat里面配置如下:
<error-page>
<error-code>404</error-code>
<location>/index.html</location>
</error-page>

根据以上的配置,我发现项目在除了IE的情况下,F5刷新都可以重新加载项目,而在IE下刷新就会出现上面的错误页面。
经过一番研究,造成这个问题的原因是IE 的 Friendly HTTP Error Pages

我们的tomcat每次返回404然后返回index.html的时候,我们的Index.html是小于512 bytes,IE 就会替换Index.html为它自己的错误页面,也即最开始出现的错误页面。

知道了造成问题的原因后,解决问题就很简单,在Index.html里面添加字符使其大于512 bytes。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.