sharepoint 2007 中的 Web 部件加载速度非常慢

发布于 2024-10-06 22:42:35 字数 301 浏览 0 评论 0原文

我有一个共享点网站,其中部署了 10 个不同的自定义 Web 部件。我有一个特定的 Web 部件,需要花费大量时间来加载。 (这个特定的 Web 部件是一种博客聚合器,它连接到 rss' 并显示列表中指定的每个博客的最新博客文章)。我的所有其他 Web 部件都是基本的 Web 部件。由于我的博客聚合器 Web 部件需要花费大量时间,因此加载共享点网站需要相当长的时间。所以,我的问题是,如何立即加载带有其他 Web 部件的共享点网站,同时在后台加载博客聚合器? (就像 sharepoint 中开箱即用的 RSS 聚合器一样)

非常感谢您的帮助。

谢谢。

I have a sharepoint site in which I have deployed 10 different custom web parts. There I have a particular web part which takes lots of time to load. (This particular web part is kind of a blog aggregator which connects to rss' and show the most recent blog post of each of the blogs specified in a list). All my other web parts are pretty much basic web parts. Since my blog aggregator web part takes a lot of time, it takes a considerable time to load the sharepoint site. So, my problem is that, how to load my sharepoint site with other web parts instantly, while loading the blog aggregator in background? (Just like in out-of-the-box RSS aggregator in sharepoint)

Your help is highly appreciable.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

魂ガ小子 2024-10-13 22:42:35

如果错误的 Web 部件是闭源的或供应商提供的,那么您无能为力(除了恳求他们发布更新)。

如果您可以更新 Web 部件,对我有用的事情之一就是在 JavaScript 和 Web 服务之间拆分 Web 部件的逻辑,并通过 JavaScript 异步调用 Web 服务。这将使页面看起来加载得更快,因为当 RSS 部分等待响应时,页面的其余部分可以呈现。您将需要使用 Web 服务,而不是直接通过 JavaScript 下载 RSS 内容,以绕过大多数浏览器中的跨站点脚本保护。

像 jquery 这样的 JavaScript 库使得异步调用 Web 服务变得相当简单。

这种方法的缺点是您可能需要撕掉 Web 部件的内部内容并重新开始。

If the errant web part is closed source or vendor supplied, there's not much you can do (other than begging them to release an update).

If you can update the web part, one of the things that has worked for me is to split the web part's logic between javascript and a web service, and invoke the web service asynchronously via javascript. This will make the page appear to load faster because the rest of the page can render while your RSS part is waiting for a response. You will need to use a web service, rather than downloading the RSS content directly via javascript, to get around cross-site scripting protection in most browsers.

A javascript library like jquery makes it fairly simple to asynchronously invoke a web service.

The downside of this approach is that you'll probably need to tear out the guts of your web part and start over.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文