-多年互联网运维工作经验,曾负责过大规模集群架构自动化运维管理工作。 -擅长Web集群架构与自动化运维,曾负责国内某大型金融公司运维工作。 -devops项目经理兼DBA。 -开发过一套自动化运维平台(功能如下): 1)整合了各个公有云API,自主创建云主机。 2)ELK自动化收集日志功能。 3)Saltstack自动化运维统一配置管理工具。 4)Git、Jenkins自动化代码上线及自动化测试平台。 5)堡垒机,连接Linux、Windows平台及日志审计。 6)SQL执行及审批流程。 7)慢查询日志分析web界面。
说明: 这是本系列的第一篇文章,我会尽快发后续的文章。 源起 1.加快葬送IE6浏览器的进程 世界上使用IE6浏览器最多的地方在中国 中国使用IE6浏览器最多的地方在企业中 让他们自己去装个chorme太难了 索性开发个浏览器(其实是浏览器的外壳)给他们 用"代码改变世界"是博客园园友的口号 2.一劳永逸的解决浏览器兼容问题 各种浏览器的CSS hack问题再也不用担心了 甚至公司里前端的职位也可以减少几个了 3.更方便的使用更强大的HT
最近有用到php的json字符串要转成js对象,以前一直用jq或者eval,又发现了其他的方法,记录下.
产品的角度(产品的受众、受众的浏览器比例、效果优先还是基本功能优先) 成本的角度 (有无必要做某件事)
前一阵对公司网站的购物车功能进行了改造,允许不同商家的商品放到同一个购物车,下单时自动按商家来拆分订单。 本地测试时一切正常,IE6/IE7/IE8均没问题。部署到服务器上后试运行几天,有客户反馈说使用购物车下单时,点击提交按钮后,多数时候不能正常生成订单,但也有少部分时候能正常。 于是我又在本地开发环境(win7 + ie8)下测试了一番(包括IETest用IE6.0模拟),然后又用本机浏览器(IE8)测试了线上正式环境的下单,仍然一切正常,当时的第一反应,既然有时候能正常下单,说明代码应该是正确的,于是
JavaScript检测IE浏览器是哪个ie版本代码,包括是否是ie6的识别与检测: var ie=!!window.ActiveXObject; var ie6=ie&&!window.XMLHttpRequest; var ie8=ie&&!!document.documentMode; var ie7=ie&&!ie6&&!ie8; if (ie){ if (ie6){ alert(”ie6″); }else if (ie8){ alert(”ie8″)
1、什么是CSS hack? CSS hack是通过在CSS样式中加入一些特殊的符号,让不同的浏览器识别不同的符号(什么样的浏览器识别什么样的符号是有标准的,CSS hack就是让你记住这个标准),以
不同的浏览器对CSS的解析结果是不同的,因此会导致相同的CSS输出的页面效果不同,这就需要CSS Hack来解决浏览器局部的兼容性问题。而这个针对不同的浏览器写不同的CSS 代码的过程,就叫CSS Hack。
各浏览器对页面外部资源加载的策略 这个总结来源于一次优化的请求,最初某个页面的加载十分缓慢,load事件迟迟无法触发,因此希望可以通过对静态文件分域名等方式对页面的外部资源进行优化,拿得load事件尽可能早地触发。 于是我查看了页面的源码,并对外部资源进行了整理,基于下面2个理念画出了一个推测的瀑布图: 浏览器对同一个域只能并发2个HTTP请求 – 网上盛传已久。 javascript文件的加载会阻塞浏览器其他资源的加载 – 同样网上盛传已久。 然而,当我看到各浏览器中实际的瀑布图时,我知道
每个浏览器不同的内核,不同的处理引擎,不同的渲染引擎就会导致写同一条样式的时候出现差异 这个现象叫做做兼容
在 IE6/7 里 JavaScript 会从两个方面阻碍页面呈现: script 标签下面的网页资源在 script 加载完之前会停止请求、下载。 script 标签下面的 html 元素在 script 加载完之前会停止渲染。
1.1 js同步执行与异步执行 js的执行机制:js是单线程环境,从上到下、依次执行,即 同步执行;在这段代码中,for循环是同步代码,setTimeout是异步代码。 js在执行代码的过程中,碰到同步代码会依次执行,碰到异步代码就会将其放入任务队列中进行等待,当同步代码执行完毕后再开始执行异步代码,即 异步执行。
在Firefox,chrome,opera,safari,ie9,ie8等高级浏览器直接可以用JSON对象的stringify()和parse()方法。 JSON.stringify(obj) 将JSON对象转为字符串。 JSON.parse(string) 将字符串转为JSON对象格式。
代码如下: JSON.parse(jsonstr); //可以将json字符串转换成json对象 JSON.stringify(jsonobj); //可以将json对象转换成json对符串
在进行网站开发过程中,IE是另很多程序员头疼的一个浏览器,他的版本兼容性很难调整,尤其是IE6,IE7,IE8,IE9,IE10这几个版本的区别有很大。现在百度与谷歌都有了一行解决这种兼容性的代码了。我们先来看一下百度的。
Ajax基础: --ajax:无刷新数据读取,读取服务器上的信息 --HTTP请求方法: --GET:用于获取数据,如浏览帖子 --POST:用于上传数据,如用户注册
虽然 IE6 骂声不断,但是仍然还有不少的市场份额。而在网页中,png 文件体积小、无锯齿、透明度好而被广泛使用。当这两件事情碰在一起,问题就来了,IE6 不支持 PNG 透明图片,它会把透明的部分显示成白色的。
浏览器之战Node的诞生浏览器端JS和Node端JS的区别理解NodeJS的事件驱动和异步IONodeJs能做什么?
HTML5shiv is a javascript workaround to provide support for the new HTML 5 elements in IE Browsers older than IE 9.
对许多前端工程师来说,如果他们足够在意的话,IE6是经常折磨他们的痛。在当前环境下,昔日的浏览器王者IE6正日渐黄昏,微软也将在2014年彻底不支持IE6,还上线了个一个页面IE6 Countdown,鼓励全球用户与IE6彻底说拜拜。许多WordPress主题已经默认不支持IE6了(比如我本站目前使用的主题),对于IE6访客,我们可以友善地提醒他们升级浏览器(毕竟IE6访客还是挺多的,不信看看下文数据)。下面就介绍免插件仅代码实现IE6浏览器升级提示的方法(代码)。 统计数据:Jeff的阳台相关访客
第一章 一、内联块 display: inline-block; 1、特征: 1.1 块级元素在一行显示 (得到内联元素的属性) 1.2 内联元素支持宽高 (得到块的属性) 1.3 没有宽度的时候,内容撑开宽度 (得到内联元
x-ua-compatible 用来指定IE浏览器解析编译页面的model x-ua-compatible 头标签大小写不敏感,必须用在 head 中,必须在除 title 外的其他 meta 之前使用。 1、使用一行代码来指定浏览器使用特定的文档模式。 <meta http-equiv="x-ua-compatible" content="IE=9" > <meta http-equiv="x-ua-compatible" content="IE=8" > <meta http-equiv="x-ua-compatible" content="IE=7" > 2、在一些情况下,我们需要限定浏览器对文档的解析到某一特定版本,或者将浏览器限定到一些旧版本的表现中。可以用如下的方式: <meta http-equiv="x-ua-compatible" content="IE=EmulateIE9" > <meta http-equiv="x-ua-compatible" content="IE=EmulateIE8" > <meta http-equiv="x-ua-compatible" content="IE=EmulateIE7" > 使用这种写法,浏览器或者使用标准模式进行解析,或者使用 IE5 Quirks 模式进行解析。 3、为了测试,我们也可以使用下面的语句指定浏览器按照最高的标准模式解析页面。 <meta http-equiv="x-ua-compatible" content="IE=edge" > 4、多个模式的指定。我们可以用逗号分割多个版本,这种情况下,浏览器会从这个列表中选择一个他所支持的最高版本来使用标准模式进行渲染。如下面的例子,在IE8进行浏览时,将会使用IE7的标准模式进行渲染,因为他本身不支持IE9和IE10。 <meta http-equiv="x-ua-compatible" content="IE=7,9,10" > 参考: http://www.cnblogs.com/cocowool/archive/2013/04/25/3043832.html http://www.cnblogs.com/nidilzhang/archive/2010/01/09/1642887.html http://msdn.microsoft.com/en-us/library/jj676915(v=vs.85).aspx 一行代码解决各种IE兼容问题,IE6,IE7,IE8,IE9,IE10 2012-04-25 16:29:04| 分类: 学习 |字号 订阅 在网站开发中不免因为各种兼容问题苦恼,针对兼容问题,其实IE给出了解决方案Google也给出了解决方案 百度也应用了这种方案去解决IE的兼容问题 百度源代码如下 <!Doctype html> <html xmlns=http://www.w3.org/1999/xhtml xmlns:bd=http://www.baidu.com/2010/xbdml> <head> <meta http-equiv=Content-Type content=“text/html;charset=utf-8″> <meta http-equiv=X-UA-Compatible content=IE=EmulateIE7> <title>百度一下,你就知道 </title> <script>var wpo={start:new Date*1,pid:109,page:‘superpage’}</script> <meta http-equiv=X-UA-Compatible content=IE=EmulateIE7> 可以打开百度,右键查看源码看下!我们可以看下文件头是否存在这样一行代码! 这句话的意思是强制使用IE7模式来解析网页代码! 在这里送上几种IE使用模式! <meta http-equiv=“X-UA-Compatible” content=“IE=8″> 2. Google Chrome Frame也可以让IE用上Chrome的引擎: <meta http-equiv=“X-UA-Compatible” content=“chrome=1″ /> 3.强制IE8使用IE7模式来解析 <meta http-equiv=“X-UA-Compatible” content=“IE=EmulateIE7″><!– IE7 mode –> //或者 <meta http-equiv=“X-UA-Compatible” content=“IE=7″><!– IE7 mode –> 4.强制IE8使用I
非IE6浏览器:var obj = new XMLHttpReuqest();
可能老赵很反感IE6,所以他在自己的博客里面做了点手脚,如果是IE6浏览他的博客的话,那么就会跳转到另一个页面。 很郁闷,看个博客吗,还要在安装一个浏览器?俺很懒,俺就是想要用IE6看! 最近在看jQuery,刚刚入一点门,发现了一个有趣的函数,就拿老赵的博客做实验了,哈。 装入一个 HTML 网页最新版本。 jQuery 代码: $.ajax({ url: "test.html", cache: false, success: function(html){ $("#re
有时,我们为了让一些外观在不同浏览器中做保持一致。就不得不用css hack。下面是常用的css hack。
Dialog.open({ID,Title,URL,InnerHtml,InvokeElementId,Width,Height,Top,Left,Drag,OKEvent,ShowButtonRow,MessageTitle,Message,AutoClose,OnLoad})
1、什么是 Ajax? Ajax,英文名 Asynchronous JavaScript and XML,也就是异步的 JavaScript 和 XML。它不是一门新的语言,而是一种使用现有标准的
https://blog.csdn.net/p358278505/article/details/78718283
使用闭包主要是为了设计私有的方法和变量。闭包的优点是可以避免全局变量的污染,缺点是闭包会常驻内存,会增大内存使用量,使用不当很容易造成内存泄露。
鸡肋,食之无味弃之可惜 出自《三国志·魏书·武帝纪》裴松之注引《九州春秋》曰:“夫鸡肋,弃之如可惜,食之无所得,以比汉中,知王欲还也。”什么意思呢?其比喻做没什么意义但又不忍舍弃的事情。 今天我们就来说说曾经遇到的各种鸡肋知识点。 HTML“肋” 最初,计算机其实是一个很高大上技术门槛很高的东西,是科学界的利器。在最初发明网页时,只有HTML语言,并没有CSS语言,原因也很简单,最初更多的是论文类的信息在互联网上传播。 相信很多人在自学结构时或在网上查找资料时,会看到q b sub sup code var
typeof存在一些兼容性的问题,在IE6,7,8中的DOM和BOM元素及其对象上的方法的判定会出现误差,在safari上对NodeList实例 的判定,对ExpReg实例的判断(早期的chrome,safari会对ExpReg实例认定为‘function’)。 分析: 之所以会在IE6,7,8对DOM和BOM元素及其方法判定错误,主要是因为在这3个版本的IE中,js引擎JScript并没有集成到IE浏览器内核 中,通过COM组件链接JScript和IE内核,浏览器实现的BOM对象或者DOM对象及其
全称: Asynchronized(异步) Javascript And Xml 技术组成有: Javascript、DOM、CSS 和 XMLHttpRequest
综述:虽然说被停止支持,但是不得不说的是,IE6的市场并不会随着支持的停止而立刻消散下去,对于WEB前端开发工程师来说,兼容IE6 兼容各个浏览器,依然是不得不面对的工作。
要解决png在ie6下不透明的问题,百度一下一大堆。试过iepngfix那个~~但貌似不行,或者很麻烦。 我试用了一段js,果然有效~~~记录一下。这个最简单,对于不是用png做背景图的情况最好了。 1、页面中加入这个:(本来想用那个注释判断IE6的,但发现导致页面布局有点问题) <script type='text/javascript' src="/script/ie6.pngfix.js"></script> 2、ie6.pngfix.js代码:(没有排版,很挫~~大家反正复制粘贴即
$.parseJSON( jsonstr ); //jQuery.parseJSON(jsonstr),可以将json字符串转换成json对象
一. 认识 (1) jQuery 文件有两个常用版本:一个是 1.x 版本,另一个是 3.x 版本。3.x 版本是目前的最新版本,与 1.x 版本有着相同的 API。1.x 版本兼容 IE6、IE7 和 IE8,而 3.x 版本不兼容 IE6、IE7 和 IE8。
最近一直没闲着,主题也没时间做,抽空把主题完善了一下,近期会更新到zbp应用中心。
虽然以前就知道浏览器有文档模式,但是一直对他迷迷糊糊。这本书有说道,于是就仔细看看吧。 文档模式有3种, 混杂模式 标准模式 准标准模式 混杂模式是一般的浏览器在开发者没有声明的时候默认使用(不过这种模式在不同的浏览器下表现的差异很大,一般不要用),因为文档模式是在IE5.5出现时引入的,所以混杂模式的作用是让之后得浏览器版本的行为更像IE5.5,而标准模式则是为了让IE的行为更像标准(遵守W3C的标准),最后一种准标准模式,我就呵呵了,看了半天也没理解书上那简短的一句话讲的是什么,但是度娘说准标准模式在I
本文总结了div+css布局时常见的IE6兼容性问题及解决方法,包括14个常见问题及相应的解决方法。
----------------------------------json---------------------------------------------- json是一种特殊的数据格式 Json相对于普通格式来说,只是把属性名用双引号包起来了(单引号不行) 在window浏览器中,提供了一个叫做(window.JSON)JSON的属性,它里面提供了两个方法: 1>JSON.parse(xxx) 在ie6~8不支持 2>JSON.stringify(xxx) 在ie6~8不支持
jQuery是一套JavaScript的库,它简化了使用Javascript进行网页特效开发的一些复杂性,提供了对常见任务的自动化和复杂任务的简化。
页面模板 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="UTF-8"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta name="description" content="本网站的目的是....." /> 7 <meta name="keywords" content="作品集,素材库"
CSS对浏览器的兼容性有时让人很头疼,或许当你了解当中的技巧跟原理,就会觉得也不是难事,从网上收集了IE7,6与Fireofx的兼容性处理方法并整理了一下.对于web2.0的过度,请尽量用xhtml格式写代码,而且DOCTYPE 影响 CSS 处理,作为W3C的标准,一定要加 DOCTYPE声名.
IE6不支持min-height,解决办法使用css hack: .target { min-height: 100px; height: auto !important; height: 100px; // IE6下内容高度超过会自动扩展高度 } ol内li的序号全为1,不递增。解决方法:为li设置样式display: list-item; 未定位父元素overflow: auto;,包含position: relative;子元素,子元素高于父元素时会溢出。解决办法:1)子元
jQuery一般来说还是很好用的,但有时候它也会有些问题的,比如jQuery的html()方法设置html代码,在一种情况下,ie6、ie7、ie8 下是不能设置html代码的。本文说的问题只针对ie8(包括ie8)以下的浏览器。 1.什么情况下IE6、IE7、IE8 jQuery.html("xxx")方法会设置不上html代码? 答:当被加载的的html代码里面出现以下情况,ie8(包括ie8)以下是设置不上html代码的: a) 被设置的html代码中包含引用其他js的,如:<scr
一、前言 从IE8开始引入了文档兼容模式的概念,作为开发人员的我们可以在开发人员工具中通过“浏览器模式”和“文档模式”(IE11开始改为“浏览器模式”改成更贴切的“用户代理字符串”)品味一番,它的出现极大地方便了苦逼的前端攻城狮们适配各版本的IE,但jser们也不能完全信任它,因为它只是提供尽可能的文档模式模拟而已。 本篇大部分内容来源于官方解说:http://msdn.microsoft.com/library/cc288
浏览器有着大量不同的版本,不同种类的浏览器的内核也不尽相同,所以不同浏览器对代码的解析会存在差异,这就导致对页面渲染效果不统一的问题。
领取专属 10元无门槛券
手把手带您无忧上云