But I plan on using the script on sites that do not use it. (I want to note that this site in fact uses jQuery. I use this to asynchronously load some stylsheets. The noscript tag is located inside the tag. I need to remove it because the code working with the element might be executed several times. Since I am accessing the element over an specific ID and using it's content a working solution might be changing the ID or emptying the content. Noscript.innerHTML = "" // doesn't do anything Noscript.outerHTML = "" // doesn't do anything (noscript) // noscript.parentNode is null I tried these: // The noscript tag has a id. So the question would be what your real goal is by ignoring that section of a page when a lot of the other components might be just as dangerous.I am trying to remove a tag with JavaScript. Like the `canvas´ element, Flash and cookies. Except with some really subjective rules.įurther more if you're concerned about tracking, rather than the information on whenever or not you have JavaScript enabled, there are a lot more technologies that could expose you. As you would not be able to discern the nature of that content without looking it, potentially loading additional resources, there doesn't seem to be a good way to identify "bad" content here. On certain sites the noscript tag could contain valuable information for you. This would probably the most secure option but also the most complex.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |