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
- Login to Dexecure Dashboard and create a Dexecure domain at https://app.dexecure.com/dashboard.
- Add the domain you want to optimize
- Once you add a domain in the dashboard, you would get a Dexecure domain like xxx.cloudfront.net
- 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" />
Now all assets going through Dexecure would automatically be optimized based on the browser, device, network, screen resolution, etc. automatically!