当前位置:网站首页>Chrome development tool: what the hell is vmxxx file

Chrome development tool: what the hell is vmxxx file

2022-07-04 19:47:00 Hu Anmin

describe

stay Chrome Cannot search for related js file , And event content , But the functions are easy to use , It's amazing ,
 Insert picture description here

Then found in resources , There is no function related js, only one jsp , So how is the function loaded , Why is it still easy , Then I'm in the corresponding js Added... To the file debugger A breakpoint , And then in Chrome Found during debugging , Show vmxxx What the hell is this , Where did you get this file
 Insert picture description here
Then I went online to check the relevant information and found ,[VM] (scriptId) No special meaning . This is a virtual name , Whenever you pass AJAX load HTML Content and the content contains tags , This script will use eval() To assess the , And be Chrome Of Sources The view is identified as " VM" New file at the beginning . You can always go to " The Internet " label , find AJAX request , Then look at the whole... Including the script HTML Respond to .
 Insert picture description here
Sure enough, it passed ajax Loaded page , Because the explorer of the browser will only load the page for the first time , It will record all the files used when the current page is loaded , The subsequent loading of the file will not , This leads to asynchronous loading , We can't pass Chrome Provided search You can directly search , because Chrome Provided search Only the contents in the resource file can be searched , How to judge whether it is ajax The request of ?
 Insert picture description here
In most scenarios, you can use the above method to judge whether it is ajax request Be careful : Under the crossing request , Not set by default X-Requested-With head .

 Insert picture description here

give the thumbs-up - Collection - Focus on - Easy to review and receive the latest content in the future
There are other questions to discuss in the comments section - Or believe me - I will reply as soon as I receive it
thank , coordination , I hope my efforts will help you ^_^

disclaimer : Part of the material in this paper comes from the Internet , The copyright belongs to the creator , If articles exist / picture / Improper use of audio and video , Please feel free to contact me by private letter .
原网站

版权声明
本文为[Hu Anmin]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207041818598543.html