arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2305.01071cs.DL
收藏

正确的HTML,错误的JSON:重放基于客户端渲染构建的归档网页所面临的挑战

Right HTML, Wrong JSON: Challenges in Replaying Archived Webpages Built with Client-Side Rendering

Michele C. Weigle, Michael L. Nelson, Sawood Alam, Mark Graham

AI总结:

本研究针对客户端渲染网页的传统归档技术存在JSON与HTML不同步、时间违规难检测的问题,以CNN.com为例验证了违规规模,并指出基于浏览器的爬取可缓解问题但速度较慢。

摘要:

许多网站正在转变其页面构建方式。传统模式下,内容在服务器端嵌入HTML中,并通过HTTP响应返回给客户端。越来越多的网站正转向一种新模式:初始HTTP响应仅包含HTML骨架与JavaScript代码,后者会向各类服务器发起API调用以获取内容(通常为JSON格式),随后在客户端构建DOM,这更便于实现页面内容的定期刷新与动态修改。这种客户端渲染模式如今在Twitter、Instagram等社交媒体平台中占据主导地位,也正被CNN.com等新闻机构采用。当传统网络归档技术(例如使用Heritrix进行爬取)应用于在客户端渲染内容的页面时,JSON响应可能会与其本应嵌入的HTML页面不同步,从而导致重放时出现时间违规问题。由于违规的JSON无法在页面中直接被观察到(即不像违规的嵌入图片那样可被直接察觉),这类时间违规问题很难被检测到。我们阐述了CNN.com首页自2015年4月起采用客户端渲染的情况,以及这一做法对网络归档造成的影响。在2015年4月24日至2016年7月21日期间,我们发现近15000个memento(归档网页快照)存在时间违规问题,即CNN.com基础HTML与用于传递主报道下内容的JSON响应之间的时间差超过2天。缓解该问题的一种方法是使用基于浏览器的爬取方式,而非Heritrix这类传统爬取工具,但目前基于浏览器的爬取速度远慢于Heritrix等非浏览器类工具。

英文摘要:

Many web sites are transitioning how they construct their pages. The conventional model is where the content is embedded server-side in the HTML and returned to the client in an HTTP response. Increasingly, sites are moving to a model where the initial HTTP response contains only an HTML skeleton plus JavaScript that makes API calls to a variety of servers for the content (typically in JSON format), and then builds out the DOM client-side, more easily allowing for periodically refreshing the content in a page and allowing dynamic modification of the content. This client-side rendering, now predominant in social media platforms such as Twitter and Instagram, is also being adopted by news outlets, such as CNN.com. When conventional web archiving techniques, such as crawling with Heritrix, are applied to pages that render their content client-side, the JSON responses can become out of sync with the HTML page in which it is to be embedded, resulting in temporal violations on replay. Because the violative JSON is not directly observable in the page (i.e., in the same manner a violative embedded image is), the temporal violations can be difficult to detect. We describe how the top level CNN.com page has used client-side rendering since April 2015 and the impact this has had on web archives. Between April 24, 2015 and July 21, 2016, we found almost 15,000 mementos with a temporal violation of more than 2 days between the base CNN.com HTML and the JSON responses used to deliver the content under the main story. One way to mitigate this problem is to use browser-based crawling instead of conventional crawlers like Heritrix, but browser-based crawling is currently much slower than non-browser-based tools such as Heritrix.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑