CDN tailored for the Saget Malinau framework
Serve static assets (CSS, JavaScript, fonts, images) from a globally‑cached edge to make Saget‑based apps load faster and more reliably. Includes examples and recommended headers for use with Saget's asset pipeline and helper functions.
- Cache TTL
- Configurable — recommended immutable versioning + long TTL
- Compression
- Brotli & gzip auto negotiation
- HTTPS
- Managed TLS (Let's Encrypt or provided certs)
- Security
- CORS headers, CSP friendly, signed URLs if needed
Quick usage
Copy one of the integration snippets below. Examples include a Saget helper example so you can load assets from the CDN inside your Saget Malinau views, templates, or asset pipeline.
<link rel="stylesheet" href="https://cdn.malinau.go.id/saget/css/main.min.css" integrity="sha384-..." crossorigin="anonymous">
<script src="https://cdn.malinau.go.id/saget/js/app.bundle.min.js" integrity="sha384-..." defer></script>
<?php
// Example helper usage inside a Saget view/template
// asset_url() is a small helper that resolves to the CDN path
?>
<link rel="stylesheet" href="<?= asset_url('css/main.min.css') ?>">
<script src="<?= asset_url('js/app.bundle.min.js') ?>" defer></script>
Add integrity or versioning:
<?= asset_url('css/main.min.css', ['v' => '20250914']) ?># Example: during build, upload hashed files to CDN and output manifest
saget build --output public/dist
saget deploy:cdn --manifest public/dist/manifest.json
# then use asset_url() to read manifest and return CDN URL
Example files & manifest
Updated:
Integration tips for Saget Malinau
- Use hashed filenames (e.g.
app.ab12cd34.js) and immutable caching headers so browsers can cache long-term. - Keep a small JSON manifest mapping original filenames to CDN URLs; make your
asset_url()helper read the manifest. - Set CORS to allow your Saget domains and configure CSP to allow the CDN host.
- Support signed or expiring URLs for private assets if necessary.