Widget - Iframe versus JavaScript

后端 未结 6 826
面向向阳花
面向向阳花 2020-12-22 23:16

I have to develop a widget that will be used by a third party site. This is not an application to be deployed in a social networking site. I can give the site guys a link to

6条回答
  •  攒了一身酷
    2020-12-22 23:30

    I'm sure many developers/site owners would appreciate a Javascript solution that they can style to their needs rather than using an iframe. If I was going to include a component from a third party, I would rather do it via Javascript because I would have more control.

    As far as ease of use, both are similar in simplicity, so no real tradeoff there.

    One other thought, make sure you get a SSL cert for whatever domain you're hosting this on and write out the include statement accordingly if the page is served over SSL. In case your site owners have a reason for using SSL, they would surely appreciate this, because Firefox and other browsers will complain when a page is served with a mix of secure/insecure content.

提交回复
热议问题