当前位置:网站首页>2021-10-25 browser compatibility problems
2021-10-25 browser compatibility problems
2022-07-19 07:20:00 【Walk in the clouds】
Project scenario :
The commonly used browsers on the market are : Google , new IE,FireFox,QQ, sogou ,Opera,360 etc. . Software development needs to consider the compatibility of various browsers , This is a headache .
Here I especially praise Google and Opera, Compatibility is great .FireFox Compatibility is really poor , new IE Not bad , Basically the same as Google . It is suggested to unify browsers in the future , Lighten the burden on developers
Problem description :
Here are some problems encountered at present :- Use content Replace img Picture question (FireFox)
- Some style deformation problems (FireFox、QQ browser )
- FireFox Browser is not available reload() Refresh the page
- Baidu map cannot be loaded (360 browser 、 Old computer system )
- select Scroll bar style of label drop-down box ( Except for Google 、 new IE、Opera, Other browsers have . It is currently in a pending state )
Solution :
- Question 1 :FireFox Browser ,img There is no way to pass the picture content To update the replacement , Only replace src Properties are OK . Use content What can be replaced is div label . therefore Recommended for future use img Labels show pictures using src, To switch pictures dynamically , Use JS operation
- Question two : Browser page deformation incompatible problem , In especial FireFox, You can set the style separately , Make some small changes , To solve this problem
- Question 3 : Together with the last question , The solution is as follows :
// Determine whether it is Firefox , Other similar
var userAgent = navigator.userAgent;
if (userAgent.indexOf('Firefox') > -1) {
// FireFox Can't use reload Reload , It can be loaded in the following ways
window.location.href = window.location.href;
}else{
location.reload();
}
- Baidu map cannot be loaded , Show the following questions , Be careful : This problem occurs in win7 System , On the old machine , Use your own computer 360 It's normal , After research, it is found that the reason for the problem is that the old machine in order to improve performance , The default installation is not enabled webGL Support for , The problem that led to this

terms of settlement :
Open the browser WebGL The function first requires the browser to support this function , With chrome Browser as an example :
- Right click chrome Browser shortcuts , Click properties ;
- Click the Shortcut tab , Enter –enable-webgl --ignore-gpu-blacklist --allow-file-access-from-files, Then click OK
- Parameter function introduction :
--enable-webgl Open for indication WebGL Support ;
-gpu Said to ignore GPU The blacklist , That is to say, there are some graphics cards GPU Because it is too old , It is not recommended to run WebGL, This parameter allows the browser to ignore the blacklist , Forced operation WebGL;
--ignore-gpu-blacklist Indicates that resources are allowed to be loaded locally , If you're not WebGL The developer of the , No need for development debugging WebGL;
I just want to have a look WebGL Of Demo, Then you can not add this parameter :
–allow-file-access-from-files.
5. Question five : I don't know how to solve , Most people on the Internet say ::-webkit-scrollbar Pseudo class to modify , But this way is only in Google , new IE,Opera Effective in , except FireFox, Other browsers in div The label is valid , stay select Invalid in , stay QQ This method can be used in browsers to remove the default style . But it doesn't solve the fundamental problem .
边栏推荐
- WCDMA soft handoff performance matlab simulation m, comparing the average number of activation sets (MasN), activation set update rate (Asur) and call interruption probability (OP) three performance i
- 快速掌握sort命令,tr命令
- My world 1.12.2 Magic Baby (Fairy treasure dream) service opening tutorial
- PyTorch学习笔记(一)
- m基于matlab的协作mimo分布式空时编码技术的仿真
- Review summary of MySQL
- Pycharm安装教程
- ArraysList方法
- 爬虫基础—代理的基本原理
- 网络知识-04 网络层-IPv6
猜你喜欢

Review of Linear Algebra

Performance evaluation and comparison of lightweight application servers of major cloud service manufacturers, Alibaba cloud, Tencent cloud, Huawei cloud, and ucloud

WCDMA soft handoff performance matlab simulation m, comparing the average number of activation sets (MasN), activation set update rate (Asur) and call interruption probability (OP) three performance i

网络知识-04 网络层-IPv4协议

Review summary of MySQL

m基于Lorenz混沌自同步的混沌数字保密通信系统的FPGA实现,verilog编程实现,带MATLAB混沌程序

Data protection / disk array raid protection IP segment 103.103.188 xxx

Paper reading: deep residual learning in spiking neural networks
![Minecraft integration package [gtnh] gray Technology: new vision server building tutorial](/img/59/d5f226f57cfd7d28d5a76ff38fae16.png)
Minecraft integration package [gtnh] gray Technology: new vision server building tutorial

正则表达式
随机推荐
m基于simulink的16QAM和2DPSK通信链路仿真,并通过matlab调用simulink模型得到误码率曲线
Steam game high frequency i9-12900k build cs:go server
1. What is a server?
Crawler Basics - session and cookies
9.账户和权限
快速掌握sort命令,tr命令
Review summary of MySQL
Recursive access to directories, print Fibonacci sequences, high-order functions
9. Account and authority
Sword finger offer question brushing record - offer 03 Duplicate numbers in array
网络知识-03 数据链路层-以太网
Servlet 笔记
快速理解重定向
Review of Linear Algebra
Sword finger offer question brushing record - offer 06 Print linked list from end to end
PyTorch学习日记(三)
What if the website is hijacked?
pytorch张量
IP fragment是什么意思?如何防御IP fragment攻击?
ivew 穿梭框Transfer组件高亮显示操作值