Премини към съдържание
Преглед в приложението

По-добър начин за сърфиране.Виж още.

Nophelet

Приложение на цял екран на началния ви екран с push известия, значки и други.

За да инсталираш това app в iOS и iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
За да инсталираш това app в Android
  1. Докоснете менюто с 3 точки (⋮) в горния десен ъгъл на браузъра.
  2. Докоснете Добави на главна страница или Инсталирай app.
  3. Потвърдете докосвайки Инсталирай

Defer background images

Featured Replies

Публикувано
  • Собственик

Plugin developers often use loading images directly into the html template, for example:

<div class="ipsType_developer class" style="padding-bottom: {{developer code}%{{else}}xx%{{endif}};
background-image:url('{{developer code}');{{endif}}">

This solution works very well, but the presence of many images that load, provides a delay in loading a site.

Lazy loading accelerates speed site, but this method has many disadvantages and I personally do not use it.

I offer you a relatively easy solution for loading background images after time "onload".

1. Edit the code listed above

<div class="ipsType_developer class" style="padding-bottom: {{developer code}%{{else}}xx%{{endif}};"
data-bg="{{developer code}{{endif}}">

2. Open the includeJS template and place the script in the template at the bottom.

<script>$(function(){
  $('[data-bg]').each(function(){
    var bg = $(this).data('bg');
    $(this).css('background-image','url(' + bg + ')');
  });
});</script>

That is all. Test with online servers and make sure you speed up your site. For example, use GtMetrix and open menu Waterfall - all your background images loading after red line (onload time).

Also, PSI test stop warning your background images

Note: If you are already using a script to defer images loaded with "img src=", then read an article about combined use of defer images.

Account

Navigation

Търсене

Търсене

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.