How to Use ūsus for Webpage Pre-rendering

Mar 14, 2023 | Programming

Pre-rendering your web pages can drastically improve your website’s speed and SEO performance. In this guide, we’ll walk you through setting up and using ūsus, a powerful webpage pre-rendering service that utilizes the Chrome Debugging Protocol (CDP). Due to its recent deprecation, it is recommended to look into alternatives such as Rendertron, but understanding ūsus is essential for grasping the concepts involved.

1. What is ūsus?

ūsus is a tool that pre-renders single-page applications (SPA) into static HTML pages, improving page load performance and SEO by extracting critical CSS and handling it more efficiently. While its development is limited to bug fixes now, it remains a valuable resource for understanding pre-rendering methodologies.

2. Getting Started with Installation

First, you’ll need to install the ūsus package along with Google Chrome:

npm install usus --global

3. Using ūsus via the Command Line Interface (CLI)

After installation, you can use the tool from your terminal. Here’s a quick command overview:


$ usus --help
$ usus render --url http://gajus.com 
$ usus render --url http://gajus.com --inlineStyles true

4. Key Features Explained through Analogy

Imagine you’re hosting a grand dinner party:

  • The menu represents the crucial content of your webpage.
  • Preparing dishes ahead of time is like pre-rendering; it ensures your guests (visitors) have a delightful experience right when they arrive.
  • Setting the table nicely with all plates (CSS) in place eliminates delays once guests start coming in.
  • Using a streamlined cooking process (CDP) ensures that every dish is served hot and fresh (fast).

Similarly, ūsus allows the webpage to be ready with everything needed (static HTML and critical CSS) before the users even hit the page, making for a seamless browsing experience.

5. Configuration Options

You can fine-tune how ūsus operates by adjusting various configuration options like:

  • chromePort: Connect to an existing Chrome instance.
  • cookies: Set cookies for your requests.
  • inlineStyles: Inline the CSS to render the HTML.

6. Troubleshooting Tips

If you encounter issues while using ūsus, here are some troubleshooting ideas:

  • Ensure that you have a compatible version of Chrome installed. ūsus requires Chrome v59+.
  • Check for any network issues that may hinder loading resources.
  • Enable debug mode by exporting DEBUG=usus before running the command to gather more information.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

7. Conclusion

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox