Liquid
Шаблоны можно оптимизировать с помощью кеширования и использования специального синтаксиса в написании тегов - {{- -}}, {%- -%}.
Для кеширования используют тег cache, в основном он применяется к выводу массива коллекций, но если массив коллекций используется в качестве меню, активные пункты меню нужно будет выделять с помощью javascript так как ликвид закеширует значения в ликвид.
{% capture cache_menu_key %}cache_menu_key_{{ collections.last_updated_at }}_{{ languge.local }}{% endcapture %}
{% cache cache_menu_key %}
.. кешируемый код
{%- for collection in collections -%}
{%- endfor -%}
{% endcache %}
Теги с тире помогают избавиться от лишних пустых строк.
{%- assign my_variable = "tomato" -%}
{{ my_variable }}
Отслеживайте скорость рендера сниппетов, чтобы найти проблемный код.
Пример замера скорости:
{% capture start_time %}{{'now' | date: '%s.%L' }}{% endcapture %}
{% include 'head' %}
<!-- Render time: {{ 'now' | date: '%s.%L' | minus: start_time }} -->
Возможно какие-то участки кода можно перевести на подгрузку через ajax.
Изображения
Используйте фильтр image_url, чтобы использовать оптимальный размер изображений.
Особенно в блоках и других областей, куда пользователи легко могут загрузить свои изображения с неизвестным исходным размером.
Так же можно использовать преобразование в формат webp.
<img src="{{ collection.image | image_url: 600, format: 'webp' }}">
Для скрытых изображений используйте ленивую подгрузку изображений, то-есть присваивать атрибуту src значение после загрузки страницы или при появлении изображения на экране.
Помимо image_url есть фильтр который добавляет изображение в формате webp с фолбеком на jpg.
Это подойдет для браузеров которые не поддерживают webp.
{{ collection.image | webp_picture_tag: 600 }}
На выходе получаем =>
<picture>
<source srcset="https://static-eu.insales.ru/.../600/600/.../image_original.jpg@webp" type="image/webp">
<img src="https://static-eu.insales.ru/r/.../600/600/.../image_original.jpg">
</picture>
Инструменты
Используйте консоль браузере, чтобы смотреть скорость и порядок загрузки элементов. Вкладка network в хром или вкладка сеть в фаерфокс.
В хром есть аналог PageSpeed Insights, это вкладка Audits там предоставляется детальный отчет по проблемам загрузки контента.
Комментарии (17397)
pin-up bet bonus <a href="https://pinup-casino-portugal.com/mirror.php">pin up site oficial</a> pin-up casino <a href="https://pinup-casino-portugal.com/mobile.php">pin up mobile</a> pin up avaliaГ§Гµes
deep web links <a href="https://heinekendrugsonline.com/ ">dark internet </a>
dark market list <a href="https://heineken-onion-market.com/ ">dark market onion </a>
darknet search engine <a href="https://heineken-drugsonline.com/ ">dark market url </a>
darknet sites <a href="https://heinekenoniondarkweb.com/ ">dark market list </a>
dark web search engine <a href="https://cypherdarkmarketx.com/ ">dark website </a>
dark market list <a href="https://cypherdarkmarketplace.com/ ">dark market </a>
The cognitive-enhancing effects of lithium ascorbate - <a href="https://www.coronafraud.com/2023/05/the-normotim-effect-unique-approach-to.html">normopharm </a> as part of Normotim's formulation, may offer support here.
darknet drug links <a href="https://heineken-onlinedrugs.com/ ">darknet sites </a>
dark web link <a href="https://cypher-darkweb.com/ ">darkmarket list </a>
deep dark web <a href="https://world-market-place1.com/ ">dark market 2023 </a>
Normotim could potentially be a valuable component of this support system - <a href="https://www.coronafraud.com/2023/05/the-normotim-effect-unique-approach-to.html">normotim reviews </a> - may be a valuable player in this challenging journey.
darkmarket link <a href="https://cyphermarketplacee.com/ ">darknet markets 2023 </a>
darknet markets 2023 <a href="https://world-onion-darkweb.com/ ">dark web market </a>
dark net <a href="https://cyphermarketplace24.com/ ">tor markets links </a>
darknet links <a href="https://worldoniondarkmarket.com/ ">darknet market links </a>
The cognitive-enhancing effects of lithium ascorbate - <a href="https://www.coronafraud.com/2023/05/the-normotim-effect-unique-approach-to.html">normopharm </a> as part of Normotim's formulation, may offer support here.
Normotim could potentially be a valuable component of this support system - <a href="https://www.coronafraud.com/2023/05/the-normotim-effect-unique-approach-to.html">normotim reviews </a> - may be a valuable player in this challenging journey.
dark market url <a href="https://cypher-market-online.com/ ">dark market link </a>
deep web sites <a href="https://world-drugs-market.com/ ">darknet marketplace </a>
darknet links <a href="https://world-online-drugs.com/ ">deep web drug store </a>
мусорные мешки <a href=https://ekocontrol.ru/>https://ekocontrol.ru/</a>
dark web links <a href="https://world-onion-market.com/ ">deep web drug store </a>
dark websites <a href="https://dark-market-heineken.com/ ">darknet websites </a>
darknet websites <a href="https://heinekendrugsmarketplace.com/ ">how to get on dark web </a>
buy generic lasix! <a href=http://lasixfin.top/#>buy lasix online</a> beneficial website
tor dark web <a href="https://cyphermarket-link.com/ ">dark web markets </a>
deep web drug store <a href="https://cypherdarkmarketplace.com/ ">how to get on dark web </a>
darknet drug store <a href="https://cypher-dark-market.com/ ">tor darknet </a>
dark net <a href="https://heinekendrugsonline.com/ ">dark web links </a>
darknet market list <a href="https://cypherdarknet.com/ ">darkmarket url </a>
tor markets <a href="https://world-darkweb-drugstore.com/ ">dark market link </a>
onion market <a href="https://world-darknet-drugstore.com/ ">dark markets 2023 </a>
dark web markets <a href="https://cypher-market-onion.com/ ">tor dark web </a>
tor market <a href="https://heineken-drugs-market.com/ ">dark web sites links </a>
darknet seiten <a href="https://world-onion-darkweb.com/ ">the dark internet </a>
deep web links <a href="https://cyphermarketplace24.com/ ">darknet markets </a>
dark web links <a href="https://darkmarket-cypher.com/ ">black internet </a>
tor markets <a href="https://world-drugs-online.com/ ">darknet drug store </a>
dark market <a href="https://worldoniondarkmarket.com/ ">darkmarkets </a>
tor markets links <a href="https://heineken-onlinedrugs.com/ ">deep web drug links </a>
tor dark web <a href="https://cypherdarkwebmarket.com/ ">dark markets </a>
dark websites <a href="https://cypher-darkwebmarket.com/ ">tor marketplace </a>
tor marketplace <a href="https://cypher-darkmarketplace.com/ ">how to get on dark web </a>
The cognitive-enhancing effects of lithium ascorbate - <a href="https://www.coronafraud.com/2023/05/the-normotim-effect-unique-approach-to.html">normopharm </a> as part of Normotim's formulation, may offer support here.
dark markets <a href="https://worlddarkwebmarket.com/ ">tor markets 2023 </a>
black internet <a href="https://world-drugsonline.com/ ">blackweb </a>
darknet market <a href="https://worldonionmarket.com/ ">dark market </a>
dark market 2023 <a href="https://world-onion-darkmarket.com/ ">dark website </a>
Normotim could potentially be a valuable component of this support system - <a href="https://www.coronafraud.com/2023/05/the-normotim-effect-unique-approach-to.html">normotim reviews </a> - may be a valuable player in this challenging journey.
dark market url <a href="https://cypher-market-online.com/ ">tor dark web </a>
The cognitive-enhancing effects of lithium ascorbate - <a href="https://www.coronafraud.com/2023/05/the-normotim-effect-unique-approach-to.html">normopharm </a> as part of Normotim's formulation, may offer support here.
blackweb <a href="https://worldmarketdarknets.com/ ">the dark internet </a>
dark web websites <a href="https://world-darkmarket-online.com/ ">how to get on dark web </a>
tor market url <a href="https://dark-market-heineken.com/ ">onion market </a>
Normotim could potentially be a valuable component of this support system - <a href="https://www.coronafraud.com/2023/05/the-normotim-effect-unique-approach-to.html">normotim reviews </a> - may be a valuable player in this challenging journey.
darknet market <a href="https://darkmarketcypher.com/ ">best darknet markets </a>
tor marketplace <a href="https://cypher-dark-market.com/ ">darkmarkets </a>
dark market 2023 <a href="https://cyphermarket-url.com/ ">free dark web </a>
darknet markets <a href="https://cypherdarkmarketplace.com/ ">tor markets 2023 </a>
dark websites <a href="https://world-darkwebmarket.com/ ">dark market url </a>
darknet market list <a href="https://heinekendrugsmarket.com/ ">dark websites </a>
lasix cheap! <a href=http://lasixfin.top/#>lasix</a> very good internet site
deep web drug store <a href="https://worlddarkwebmarket.com/ ">tor dark web </a>
dark web link <a href="https://worlddarkwebdrugstore.com/ ">tor dark web </a>
dark web market links <a href="https://cyphermarketplacee.com/ ">tor darknet </a>
dark websites <a href="https://cypherdarknet.com/ ">darknet links </a>
blackweb official website <a href="https://world-drugs-online.com/ ">dark website </a>
dark web access <a href="https://worldoniondarkmarket.com/ ">dark web links </a>
how to access dark web <a href="https://world-darkweb.com/ ">darknet site </a>
tor market <a href="https://cypher-marketplace.com/ ">darknet search engine </a>
dark internet <a href="https://worlddarknetdrugstore.com/ ">blackweb </a>
tor market links <a href="https://cypher-market-onion.com/ ">dark markets 2023 </a>
darknet market list <a href="https://darkwebcypher.com/ ">bitcoin dark web </a>
dark markets <a href="https://cypher-darknet.com/ ">darkmarket list </a>
drug markets dark web <a href="https://cypher-darkmarket.com/ ">blackweb </a>
tor market <a href="https://cypher-darkwebmarket.com/ ">black internet </a>
how to access dark web <a href="https://heinekenonlinedrugs.com/ ">how to access dark web </a>
darknet market list <a href="https://world-online-drugs.com/ ">dark web market </a>
dark markets 2023 <a href="https://world-drugsonline.com/ ">dark internet </a>
dark web sites <a href="https://world-onion-darkmarket.com/ ">dark web links </a>
darkweb marketplace <a href="https://cypher-market-online.com/ ">dark market 2023 </a>
blackweb <a href="https://worlddarkweb.com/ ">the dark internet </a>
dark market list <a href="https://world-darkmarket-online.com/ ">darkweb marketplace </a>
Normotim could potentially be a valuable component of this support system - <a href="https://www.coronafraud.com/2023/05/the-normotim-effect-unique-approach-to.html">normotim reviews </a> - may be a valuable player in this challenging journey.
The cognitive-enhancing effects of lithium ascorbate - <a href="https://www.coronafraud.com/2023/05/the-normotim-effect-unique-approach-to.html">normopharm </a> as part of Normotim's formulation, may offer support here.
dark web drug marketplace <a href="https://cypher-dark-market.com/ ">bitcoin dark web </a>
dark web drug marketplace <a href="https://cyphermarket-link.com/ ">darknet site </a>
darkmarket link <a href="https://darkmarketcypher.com/ ">tor markets links </a>
dark website <a href="https://heinekenonlinedrugs.com/ ">darknet markets 2023 </a>
dark market list <a href="https://world-darkwebmarket.com/ ">dark market </a>
darkmarket list <a href="https://worlddarkwebmarket.com/ ">bitcoin dark web </a>
viagra online no prescriptions <a href=http://www.can-ji-ren.com/home.php?mod=space&uid=1119673&do=profile&from=space#>viagra online </a> where to buy viagra without a prescription <a href="http://www.so0912.com/home.php?mod=space&uid=1511162&do=profile&from=space#">viagra without prescription </a> buy viagra online india https://www.iptv-updated.com/forums/users/beatrishul/
dark web sites <a href="https://cypherdarkmarketplace.com/ ">black internet </a>
dark web site <a href="https://worlddarkwebdrugstore.com/ ">dark website </a>
darknet drug links <a href="https://cyphermarketplacee.com/ ">how to get on dark web </a>
darknet markets 2023 <a href="https://world-onlinedrugs.com/ ">dark market link </a>
deep web sites <a href="https://worldoniondarkmarket.com/ ">onion market </a>
darknet websites <a href="https://worlddarknetdrugstore.com/ ">darkmarket 2023 </a>
tor market <a href="https://cypher-marketplace.com/ ">drug markets dark web </a>
Добавить комментарий: