input file 打开选择窗口很慢

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_28027903/article/details/75007347

在实际开发中遇到 input file 打开选择窗口特别慢(5-10s)

之后见过测试是使用通配符的问题(*)

<input type="file" name="file" accept="image/*">
<input type="file" name="file" accept="image/jpg">
经过对比使用通配符速度为5-10s可能会更久(简直不能忍),
使用固定格式时长一般在0.5-2s。

使用其他文件类型同理:accept="video/mp4,video/rmvb"


经过测试只要是使用Webkit内核的浏览器都会出现窗口延迟的问题


猜你喜欢

转载自blog.csdn.net/qq_28027903/article/details/75007347