使用 Rails 3 将您网站的功能嵌入到另一个网站中(XSS 与 iframe)
我们正在寻求将我们的一些模型的显示以及支付流程与我们的一些客户的网站集成。似乎每个人都在走 Iframe 路线,但与 XSS 技术相比,这看起来也相当过时。
如何在 Rails 3 中使用 XSS 来在另一个网站中启用我们网站元素的多页面浏览功能?据我了解,我们需要使用正确的 JSON 协议,在客户端的 JSON 网站中进行自定义渲染,以及维护支付流程和购物车中页面更改之间的状态。
iframe 当然看起来更容易,但我愿意对此进行讨论,并解释使用 XSS。
We are looking to integrate the display of some of our models, as well as a payment process, with some of our client's websites. It seems that everybody is going the Iframe route, but this also looks to be rather outdated when compared to XSS techniques.
How would one go about using XSS in rails 3 to enable multi page browsing functionality of elements of our site in another's site? As I understand it, we need to get a correct JSON protocol going, custom rendering in the client's website of the JSON, as well as maintaining state between page changes in the payment process and shopping cart.
Iframes certainly seem easier, but I am open to discussion around this, and an explanation of using XSS.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要 JSONP 来执行跨域脚本编写。这是一篇很好的文章,解释了它: http: //emphaticolutions.com/2011/01/21/function-widgets-with-rails-javascript-jsonp.html
这是关于 iframe 与 iframe 的讨论jsonp:JSONP 与 IFrame?
另请了解有关 JSONP 的更多信息:https://www.google.com/search?q=writing%20widgets%20with%20jsonp
You need JSONP to do Cross domain scripting. This is a good article explaining it: http://emphaticsolutions.com/2011/01/21/functional-widgets-with-rails-javascript-jsonp.html
Here's a discussion on iframe vs jsonp: JSONP vs IFrame?
Also learn more about JSONP: https://www.google.com/search?q=writing%20widgets%20with%20jsonp