通过 HTTPS 页面的 HTTP Ajax 请求 [英] HTTP Ajax Request via HTTPS Page

查看:49
本文介绍了通过 HTTPS 页面的 HTTP Ajax 请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,其中一些页面使用 HTTPS 连接.在这些 HTTPS 页面中,我必须使用 HTTP Ajax 请求来检索一些错误,例如空白字段.但是此错误消息不会出现.是否有任何解决方案,或者我必须发出 AJAX 请求才能在 HTTPS 连接上归档?

I am having a site with some pages on HTTPS connection. From these HTTPS pages, I have to use a HTTP Ajax request for some errors retrieval like blank fields. But this error messages are not coming. Is there any solution to it or I have to make that AJAX request to file on HTTPS connection?

推荐答案

这是不可能的,因为 同源政策.

This is not possible due to the Same Origin Policy.

您还需要将 Ajax 请求切换到 https.

You will need to switch the Ajax requests to https, too.

这篇关于通过 HTTPS 页面的 HTTP Ajax 请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆