HTML5兼容性检测方法性能对比

  • 格式:pdf
  • 大小:278.29 KB
  • 文档页数:4

Ke y wo r d s: HTML5; Co mp a t i b i l i y t T e s t i n g; P e r f o r ma n c e Co mp a is r o n
2 01 7年 第 2
1 8 3
HT ML 5兼 容性检测 方法性 能对 比
李 可
( 广 东理 工职业学 院计算机技术 系 , 广东 广州 5 1 0 0 9 1 )
摘要: 对 于 HT ML 5的开发者来说影响最大 的就是浏览器的兼容性 问题 。由于 H T ML 5标准并未能很好 的被 浏
览器 所支持 , 故造成用 户体验 不佳 , 因此开发者要一一解决不同的浏览器 出现的 问题。首先要确定可 以使用哪
些高级功能 , 这 需要进 行功能探测然后提供渐进 式设 计。功能探测 可以采用 两种 解决 方式 : 原 生代码检测 法和 框架检测法。 框架 法简化 了功 能检测工作 , 但是牺牲 了一定的性能。 为 了对 比两种方法的性能差异 , 本文针对 5 个典型特性检测进行 了实验对 比, 得到的量化结果 为开发 渐进 式设计提供 了借鉴。 关键 词 : HT ML 5 ; 兼容性检测 ; 性能对 比 中图分类 号 : T P 3 1 1 文献标识码 : A 文章编号 : 1 6 7 1 - 4 7 9 2 ( 2 0 1 7 ) 2 - 0 0 3 3 . 0 4
c a l c h a r a c t e i r s t i c s . Th e r e s u l t s o f c o mp a r i s o n c a n b e u s e ul f f o r t h e d e v e l o p me n t o f p r o g r e s s i v e d e s i n. g
Pe r f o r ma nc e Co m pa r i s o n o f H TM L5 Co m pa t i bi l i t y
De t e c t i o n M e t h o ds
Li Ke
( Gu a n g d o n g P o l y t e c h n i c I n s t i t u t e, Gu a n g d o n g Gu a n g z h o u 5 1 0 0 9 1 )
Ab s t r a c t : F o r HT ML 5 d e v e l o p e r s ,t h e b i g g e s t i mp a c t i s t h e i s s u e o f b r o ws e r c o mp a t i b i l i t y. As t h e HT ML 5 n o t we l l s u p p o te r d b y t h e b r o ws e r s , r e s u l t i n g i n p o o r u s e r e x p e ie r n c e . De v e l o p e r s wi l l h a v e t o s o l v e t h e p r o b l e ms o f d i f f e r e n t b r o ws e r s s t e p b y s t e p,a n d e n s u r e t h a t t h e u s e r s d o n o t s e e t h e p a g e wh i c h h a s p r o b l e ms . De v e l o p e r s
s h o u l d i f r s t d e t e r mi n e wh a t a d v a n c e d f e a t u r e s c a n b e u s e d ,wh i c h r e q u i r e s f u n c t i o n d e t e c t i o n a n d p r o v i d i n g p r o g r e s — s i v e d e s i g n . T h e r e a r e t wo wa y s t o s o l v e t h i s p r o b l e m:d e t e c t i o n b y n a t i v e c o d e a n d d e t e c t i o n b y f r a me . T h e ra f me me t h o d s i mp l i i f e s t h e f u n c t i o n d e t e c t i o n,b u t a t t h e e x p e n s e o f c e r t a i n p e r f o m a r n c e . I n o r d e r t o c o mp a r e he t p e r f o r - ma n c e d i f f e r e n c e b e we t e n t h e wo t me t h o d s , we c o mp a r e t h e e x p e ime r n t a l r e s u l t s o f t h e f u n c t i o n d e t e c t i o n o f 5 t y p i —