If your widget is a fixed size, then the iframe approach is probably the most straightforward. If you can offer it through a web service that can be called from a remote client, this is better from the developer's point of view, but an iframe is probably what you are looking for. Itβs like regular banners, etc ..
I would suggest integrating any JS and CSS that you can add to your page to reduce remote calls if your widget hasn't changed much ... this will help to merge and at least merge and minimize your js and css into one file each.
source share