This doesn't make sense. curl doesn't know about/care about/understand JavaScript: see Does curl support JavaScript? If you want to make sure the UA/other headers align, then use a tool like Fiddler2 to see what (your) "normal browser" sends, and then read the curl documentation for how to send it "exactly like the browser".
user166390
–
user166390
2011-12-11 10:55:45 +00:00
CommentedDec 11, 2011 at 10:55
1
cURL doesn't look at javascript at all. To cURL, the entire page is just a blob of text, so whether it has only html, javascript, xml, or anything else, curl will behave the same
If you mean that you are using cURL as sort of a proxy, where it requests a page, and then outputs it as-is, then you need to remove all <script></script> tags, and anything between them, before it is outputted.
no... he means when the target URL removes content with jabascript until the user interacts somehow and triggers the content. however, when javascript is disabled in the browser, the content is delivered normally. i have experienced this occasionally -- for example, clicking a "i am over 18 years old" button on a vaping website... or any age-restricted website. pinterest is another example. so, it is not related to whether cURL processes javascript -- but rather how cURL will NOT react to javascript needed to render the content.
<script></script>tags, and anything between them, before it is outputted.