Websocket协议

 在阅读本篇文章之前,你已经阅读了:

阅读全文

nginx解决Access-Control-Allow-Origin不能为通配符的问题

在nginx配置了Allow-Credentials为true时,且Allow-Origin为通配符*时:

1
2
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';

浏览器会提示报错:
1
Access to XMLHttpRequest at 'http://127.0.0.1:8081/test' from origin 'http://127.0.0.1:8081' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

阅读全文

nginx解决Too-many-header问题

在对接海康卫视WEB无插件开发包时,自己的页面连接单独的摄像头时(连接NVR没这个问题),/ISAPI/Security/sessionLogin接口会报错误:

1
2
Access Error: 400 -- Bad Request
Too many headers

阅读全文

解决Vue框架下proxySetter时间过长的问题

 最近在对公司项目进行性能优化时,发现Vue框架下的proxySetter函数使用时间过长:

Vue中proxySetter时间过长

阅读全文

前端页面常见的性能问题总结

 最近两个月,花费大量时间去调试各种页面的性能问题,解决大量卡顿问题、内存溢出问题(解决性能问题,真的是很有技术成就感的),感觉我在前端页面性能调试已经进阶成一个有经验的人了,可以总结一些常见问题与解决办法:

调试工具

    阅读全文