为什么Facebook和Google页面具有奇怪的ID和类?

编程入门 行业动态 更新时间:2024-10-13 08:21:16
本文介绍了为什么Facebook和Google页面具有奇怪的ID和类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

很多次我检查了facebook和google页面上的元素,但是它们的页面在其html元素中始终具有id和class之类的奇怪值.看看

Many a times I have inspected element on facebook and google pages but their page always have strange values as ids and classes in their html elements. Have a look at

facebook页面上元素的属性

google plus页面上元素的属性

Q1.这是某种混淆算法的结果吗?

Q1. Is this result of some kind of obfuscation algorithm ?

如果开发人员实际使用它们(我认为不是这样),则使用此类属性进行编码将是一场噩梦.

It would be a nightmare to code with such attributes if devs actually use them which I don't think so.

Q2.他们为什么这样做?

Q2. Why are they doing it ?

推荐答案

很可能每次运行构建时它们都会生成新的类和ID,以避免出现缓存问题...这将通过构建完成而不是由开发人员定义

it's likely that they generate new classes and ids with each time the build is run to avoid having caching issues... this would be something thats done via the build and not defined by the developers

更多推荐

为什么Facebook和Google页面具有奇怪的ID和类?

本文发布于:2023-11-02 03:43:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1551274.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:奇怪   页面   Facebook   Google   ID

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!