当前位置:网站首页>Chrome开发工具:VMxxx文件是什么鬼
Chrome开发工具:VMxxx文件是什么鬼
2022-07-04 18:32:00 【胡安民】
描述
在Chrome中搜索不到相关的js文件,和事件内容,但是功能都是好使的, 这就神奇了,
然后发现在资源里,没有功能相关连的js,只有一个jsp ,那么功能是怎么加载的,为啥还好使,然后我在对应的js文件中添加了debugger一个断点,然后在Chrome中进行调试发现,显示vmxxx 这个是啥鬼,哪里来的这个文件
然后我去网上查询相关资料发现 ,[VM] (scriptId)没有特殊含义。这是一个虚拟名称 ,每当您通过AJAX加载HTML内容并且该内容包含标记时,该脚本都将使用eval()进行评估,并被Chrome的Sources视图识别为以" VM"开头的新文件。您始终可以转到"网络"标签,找到AJAX请求,然后查看包括脚本在内的整个HTML响应。
果然是通过ajax加载出来的页面,因为游览器的资源管理器只会在页面第一次加载的时候,会记录当前页面加载时候所使用的所有文件,后续在加载的文件的就不会了,这样也就导致异步加载,我么没法通过Chrome提供的search直接能搜索到, 因为Chrome提供的search只能搜索资源文件里的内容, 如何判断是否是ajax的请求呢?
绝大部分场景下都能使用上图的方式判断是否是ajax请求 注意: 在跨越请求下,默认不会设置X-Requested-With头。


边栏推荐
猜你喜欢

YOLOv5s-ShuffleNetV2

用实际例子详细探究OpenCV的轮廓绘制函数drawContours()

Hough Transform 霍夫变换原理

"Only one trip", active recommendation and exploration of community installation and maintenance tasks

Bi skills - permission axis

There are multiple divs in the large div, which are displayed on the same line. After overflow, scroll bars are generated without line breaks
关于判断点是否位于轮廓内的一点思考

SSRS筛选器的IN运算(即包含于)用法

Online text line fixed length fill tool

Pythagorean number law (any three numbers can meet the conditions of Pythagorean theorem)
随机推荐
如何使用Async-Awati异步任务处理代替BackgroundWorker?
1003 emergency (25 points) (PAT class a)
SSRS筛选器的IN运算(即包含于)用法
Explore the contour drawing function drawcontours() of OpenCV in detail with practical examples
The explain statement in MySQL queries whether SQL is indexed, and several types in extra collate and summarize
指定输出的字符集
Comment utiliser async awati asynchrone Task Handling au lieu de backgroundworker?
Shell 编程核心技术《一》
2021 Hefei informatics competition primary school group
Shell 编程核心技术《二》
矩阵翻转(数组模拟)
Educational Codeforces Round 22 E. Army Creation
测试工程师如何“攻城”(上)
kotlin 基本数据类型
Find the nth power of 2
Unity adds a function case similar to editor extension to its script, the use of ContextMenu
生成XML元素
Pytorch学习(四)
Pointnet/Pointnet++点云数据集处理并训练
Leetcode fizzbuzz C # answer