Page Load Optimizations (Lazy Loading)

How does Lazy loader work?

The Lazy loader is a JS library that renders content in front of visitors as quickly as possible. Lazy loader allows browser to load only the main content (the first post) and the minimal set of stylesheets.

All the rest content must be marked as lazy-objects so that browser can ignore it at the first rendering.

When the main content will be loaded, Lazy loader will find all marked lazy-objects and load them gradually (by downloading stylesheets and javascripts asynchronously, processing DOM elements to prevent them from blocking page rendering).

 

How to mark page objects as lazy-objects:


Above-the-fold content first

Browser should render the critical part of the page (the first post) immediately and defer the rest of them. Add lazy-loading class to the rest content sections that will hide these elements.

Before: 

<div class="search">    <form action="/core/search/">        ...    </form></div>

After: 

<div class="search lazy-loading">    <form action="/core/search/">        ...    </form></div>

Including CSS

This method of loading CSS will deliver usable content to visitors much more quicker than the standard approach. Critical CSS can still be served with the usual blocking approach (or you can inline it for ultimate performance) and non-critical styles can be progressively downloaded and applied later in the parsing / rendering process.

Before:

{% css_include 'frontpage_features' %}

Afer:

{% lazy_css_include 'frontpage_features' %}

Including inline Javascript

The loading and execution of scripts that are not necessary for the initial page render may be deferred until after the initial render or other critical parts of the page have finished loading.  Just change type attribute from text/javascript to text/lazy-javascript, so browser can ignore it at the first rendering. You can insert inline script in any part of the page, all lazy-scripts will be sorted by their priority attributes upwards.  For non-critical scripts 4 and higher priority is recommended. 

Script loading sequence:

Priority | Scripts      0  | require.js, amd_config, sprintf      1  | Settings, userSettings, Bootstrap, etc      2  | JS Templates, site features      3  | Analytics      4  | Third-party JavaScript      5  | Facebook API, Twitter API      6..| Any custom javascripts

Before:

<script type="text/javascript">    alert("example");</script>

After:

<script type="text/lazy-javascript" priority="5">    alert("example);</script>

Including external Javascript

External blocking scripts force the browser to wait for the JavaScript to be fetched,
which may add one or more network roundtrips before the page can be rendered.
Just change src attribute to data-src.

Before:

<script type="javascript" src="https://www.rebelmouse.com/embed/Huffpostgreen/elite.js"></script>

After:

<script type="text/lazy-javascript" priority="5" data-src="https://www.rebelmouse.com/embed/Huffpostgreen/elite.js"></script>

 

By default our pages are structured on they way that we can disable or enable Lazy loader in engine_settings, but we highly recommend to keep it enabled. It helps at achieving higher page speed scores.

Why RebelMouse Is the Best Content Marketing Platform

RebelMouse is a unique platform and company. The company was founded on the vision that media companies would need an always-modern solution to thrive in the new connected internet, and that brands would have to behave like new media companies and use the same platforms.

Keep reading... Show less

Why Premium Creative Agencies and CTOs Choose to Develop on RebelMouse vs. WordPress and Drupal

The Intersection of Design and Development: Where Your Clients Thrive

We started RebelMouse seven years ago knowing that there was a fundamental design flaw in the world of traditional CMSs: Every instance, on every platform, had to be updated independently. It's similar to an era when users had to manage their own Microsoft Exchange Server for email. The costs of managing, maintaining, and iterating on a CMS to keep it awesome and world class is typically a $10 million-a-year endeavor. But even then, these cost-prohibitive CMSs are still behind the times.

Keep reading... Show less

Native Multivariate Testing at Scale With RebelMouse

What Differentiates Our Approach

There are many popular tools that allow you to perform experiments and A/B tests on your users — primarily Google Chrome Experiments and Optimizely. But all of these solutions are JavaScript additions to your web page that sidestep the problem of old, outdated, and clumsy CMSs. These solutions work by calling on a third-party JavaScript library that rewrites a page after it's rendered. This approach adds extra page weight and creates strange user experiences due to having to wait for everything to load and be rewritten on the fly.

At RebelMouse, we've solved this in a very elegant way. At the core level of our platform, we can natively render different layouts and track the exact differences in performance when comparing a test to your other layouts.

Keep reading... Show less

Modern E-Commerce: Blur the Line Between Content and Design

Create Modular + Reusable Design Patterns on RebelMouse

Content saturation is an industry-wide problem, and the e-commerce space is no exception given that it's filled with big brands, small Etsy stores, and everyone in between all fighting for similar audiences. The best way to fight this symptom is to understand your audience and provide them with what they want.

Keep reading... Show less

Instagram-style E-commerce Features on RebelMouse

Revolutionizing E-commerce on RebelMouse

Whether you're a brand with a blog or a media company with a site, driving purchasing behavior and building an audience that uses your content to find things they love to buy is vital. We're very proud to have built out the same functionality that everyone is now used to on Instagram, with layovers on images that lead to products with attribution.

Keep reading... Show less

Building Premium Communities and User Journeys on RebelMouse

RebelMouse is much more than just a replacement for a traditional CMS. Our platform is a tremendous community-building experience. Today's social ecosystem has given us a seemingly limitless number of premium creators who understand how to create gorgeous and relevant content that drives the growth of their own audiences. These creators and influencers are either experts in certain topics, or heavily engaged in targeted content that drives their interests. They're not only consuming the content they're passionate about, but they're contributing to the conversation, too. The new role of the editor is not just to cover the most important topics and people around their expertise, but also to invite those preferred influencers into their community and get them to participate in creating premium content.

Keep reading... Show less

Dynamic Voting: Grow Traffic and Engagement Organically

Help your audience find its voice.

Creating quality content is no longer on marketers alone. We live in a universe of creators who are willing to not only consume content that resonates, but play a role in the creation, promotion, and conversations surrounding it.

Since the start of RebelMouse, we've been on a journey to create dynamic media that is easier for content creators to curate and amplify on social. It's why we've built an online engagement platform centered around the power of communities that thrive naturally in the digital ecosystem.

Keep reading... Show less

How to Monetize Your Website in Today’s Publishing Environment

In order to define distributive publishing, we have to ask the following question: If you have quality content, but nobody sees it, does it even exist? The answer is no, because your content needs to be supported in a way that lets it move seamlessly across all channels, especially site, search, and social. But let's take this question a step further: If you can't monetize your content to generate the support it needs, how do you create quality content in the first place?

Keep reading... Show less

RebelMouse Q1 2021 Platform Updates

Speed, performance, and Core Web Vitals enhancements

At RebelMouse, we pour our souls into making sure that our platform is always the most modern, high-performance CMS on the market. In fact, we invested over $100,000 worth of hours into our platform in Q1 2021 alone. This has resulted in updates and performance enhancements that publishers would have to pay for on their own to make happen on any other platform, such as WordPress. We're proud to be at a level of scale where we can invest this way into our platform, and we will continue to invest at this rate every quarter moving forward just as we have in the past.

Here are the major updates that we've added to the platform in Q1.

Keep reading... Show less

Nordot + RebelMouse

RebelMouse and Nordot have joined together to provide publishers access to Nordot's massive content library directly from the RebelMouse CMS.

Keep reading... Show less

Facebook Instant Articles: Troubleshooting, Debugging, and Tokens

Facebook Instant Articles are a great Facebook feature, but sometimes there can be issues that need to be addressed. In this post, we'll be looking at a few of the most common, including:

  • Resolving Facebook Instant Articles errors
  • Resolving Facebook expired token notifications
  • Resolving any setup issue regarding Facebook Instant Articles
Keep reading... Show less

SEO Decline? Google Featured Snippets Are Dramatically Reduced

You may have noticed a decline in your traffic recently, particularly from Google Search. It appears that Google has changed their algorithm to dramatically reduce the amount of featured snippets that are showing on the search engine's results page. If you consistently get traffic from featured snippets, this algo update will most likely have a negative impact on your search traffic.

Keep reading... Show less
Subscribe to Our Newsletter