If I’m using a .NET WebBrowser control, and I dynamically populate the HTML, JS content, what exactly are the rules for AJAX cross-domain requests? I know I don’t technically have a domain since it’s local content, but I’m not sure how the browser handles this.
Share
First of all, make sure you know what you’re doing and the possibility for XSS attacks before you do this. It is possible to have cross-domain AJAX with
<script>tags with some server-side modifications though, for example I used this:e.g:
The
Callbackparameter in that function adds aCallbackparameter to the request to the local server, so you’d need the server to output:So that the function can access the data.