How to Install Dexecure on Custom Websites via URL Method

How to Install Dexecure on Custom Websites via URL Method

Written by  Inian Parameshwaran
Last update:  Wednesday, Feb 24, 2021

There are two methods of integrating Dexecure with custom built websites. In this article, we will look at integrating Dexecure via the URL method.

Integrating Dexecure this way is very similar to integrating with any CDN.

Let's optimize assets being served from example.com

Getting your Dexecure Domain

  1. Login to Dexecure Dashboard and create a Dexecure domain at https://app.dexecure.com/dashboard.

  2. Go to the website and add the domain you want to optimize.

  3. Once you add a domain in the dashboard, you would get a Dexecure domain like xxx.cloudfront.net

  4. Change your HTML to load assets from your Dexecure domain instead of example.com. For example, here is how you would optimize images via Dexecure

Change your HTML from

<img src="https://example.com/image.png" />

To the following

<img src="https://xxx.cloudfront.net/image.png" />

That's it!

*You can also add the Dexecure domain to your build config so that all assets can be changed to Dexecure URLs when building your website.

Now all assets going through Dexecure would automatically be optimized based on the browser, device, network, screen resolution, etc. automatically!

Installation Guides

Integrate Dexecure with your website

5 articles in this category.
Written by Inian Parameshwaran.