Detecting redundant CSS rules in HTML5 applications: a tree rewriting approach
Detecting redundant CSS rules in HTML5 applications: a tree rewriting approach
复制标题
检测 HTML5 应用程序中的冗余 CSS 规则:树重写方法
DOI:
10.1145/2814270.2814288
复制
发表时间:
2014
期刊:
影响因子:
--
通讯作者:
C. Ong
中科院分区:
文献类型:
--
作者:
M. Hague;A. Lin;C. Ong
HTML5 applications normally have a large set of CSS (Cascading Style Sheets) rules for data display. Each CSS rule consists of a node selector and a declaration block (which assigns values to selected nodes' display attributes). As web applications evolve, maintaining CSS files can easily become problematic. Some CSS rules will be replaced by new ones, but these obsolete (hence redundant) CSS rules often remain in the applications. Not only does this “bloat” the applications – increasing the bandwidth requirement – but it also significantly increases web browsers' processing time. Most works on detecting redundant CSS rules in HTML5 applications do not consider the dynamic behaviours of HTML5 (specified in JavaScript); in fact, the only proposed method that takes these into account is dynamic analysis, which cannot soundly prove redundancy of CSS rules. In this paper, we introduce an abstraction of HTML5 applications based on monotonic tree-rewriting and study its "redundancy problem". We establish the precise complexity of the problem and various subproblems of practical importance (ranging from P to EXP). In particular, our algorithm relies on an efficient reduction to an analysis of symbolic pushdown systems (for which highly optimised solvers are available), which yields a fast method for checking redundancy in practice. We implemented our algorithm and demonstrated its efficacy in detecting redundant CSS rules in HTML5 applications.
DOI:
10.1145/2535838.2535876
发表时间:
2014
期刊:
--
影响因子:
--
作者:
Bodin M
通讯作者:
Bodin M
影响因子:
0.5
作者:
Göller S
通讯作者:
Göller S