javascript - Script to check if there are other scripts -


While storing web pages, dynamic content should be treated differently How can I find out that a page Does any javascript use?

This will end in a browser extension, so there is no need to separate it from the findings.

simply & lt; Script & gt; should be OK to check the tag

  if (document.querySelectorAll ("script"). Length) {// there are scripts on this page}   

You can scripts scan the whole page for onclick , etc in HTML tags, but it will slow down for a larger page

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -