Based on your tags, I'm going to suggest that AJAX probably works here. If this is true, you will be much better off sticking to a single access scheme. Otherwise, there will be compatibility issues between browsers and potentially pose security vulnerabilities.
If you are not doing something like transferring large media files / streams, then a modest performance boost is probably not even worth considering.
Note: potential vulnerabilities go beyond the obvious case when you send sensitive data over an insecure connection. see https://developer.mozilla.org/en-US/docs/Security/MixedContent , for example.
source share