S
S
SKRSKR2016-10-15 15:45:14
JavaScript
SKRSKR, 2016-10-15 15:45:14

Long loading VK API?

It takes a long time to load help through VK and the news of the VK group, if without it the site opens in 200-300 ms (for 2g 1.4 sec), and with it under 2 seconds (for 2g 6 sec), can I somehow optimize it?

<!-- VK Widget -->
<div id="vk_community_messages"></div>
<script type="text/javascript">
VK.Widgets.CommunityMessages("vk_community_messages", 228, {});
</script>

<!-- VK Widget -->
<script type="text/javascript" src="//vk.com/js/api/openapi.js?132"></script>
<!-- VK Widget -->
<div id="vk_groups"></div>
<script type="text/javascript">
VK.Widgets.Group("vk_groups", {mode: 4, width: "850", height: "420", color1: 'FFFFFF', color2: '000000', color3: '5E81A8'}, 228);
</script>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2016-10-16
@ExileeD

Load openapi asynchronously.
https://vk.com/dev/openapi point 2.2

K
Kirill Zhilyaev, 2016-10-15
@kirill_782

The openapi code is 80 kb in size. 3 seconds is spent loading the script. + some styles are loaded for sure. Here are your extra seconds to load. There is probably nothing that can be done here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question