---
title: "Fresh 1.4 – Faster Page Loads, Layouts and More"
description: "Fresh 1.4 adds optional ahead-of-time asset compilation via `deno task build`, which serves island assets roughly 45-60x faster on serverless cold starts than on-the-fly JIT compilation; a ~30kB search island that took 4.28s now revives near-instantly."
url: "https://swe.quest/articles/fresh-1-4-faster-page-loads-layouts-and-more-0ba54de19820b6f5"
canonical: "https://deno.com/blog/fresh-1.4"
source: "Deno"
published: "2023-08-16"
difficulty: "medium"
kind: "Release"
reading_minutes: 7
tags: ["frontend","web-performance","typescript"]
---

# Fresh 1.4 – Faster Page Loads, Layouts and More

A post on [Deno](https://swe.quest/sources/deno.md), published 2023-08-16, 7 min read, Release. Original: [https://deno.com/blog/fresh-1.4](https://deno.com/blog/fresh-1.4)

## Summary

Fresh 1.4 adds optional ahead-of-time asset compilation via \`deno task build\`, which serves island assets roughly 45-60x faster on serverless cold starts than on-the-fly JIT compilation; a ~30kB search island that took 4.28s now revives near-instantly. The development server still uses JIT. The release also lets \`\_app.tsx\` render the full html/head/body document, with a fallback to the old template when no html tag is rendered. New features include nested and async \`\_layout\` files with opt-out config, \`defineRoute\`/\`defineLayout\`/\`defineApp\` typing helpers, parenthesized route groups that don't affect URLs, and private \`(\_components)\` and \`(\_islands)\` folders for colocating code.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [Web performance](https://swe.quest/tags/web-performance.md) (Web & mobile)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)

## Prerequisites

- JSX components
- file-based routing ([easy posts on Maps & geospatial](https://swe.quest/tags/geospatial.md?difficulty=easy))
- islands architecture ([easy posts on System design](https://swe.quest/tags/system-design.md?difficulty=easy))

## Keywords

Fresh, Deno, Preact, islands architecture, ahead-of-time compilation

## Related posts

- [Fresh 1.0](https://swe.quest/articles/fresh-1-0-407c9d4b84f51b2c.md): Deno · 2022-06-28 · Medium · 5 min read · Frontend, JavaScript, TypeScript, Web performance, CDN & edge
  Fresh is a full stack web framework for Deno that renders pages just-in-time on the server and ships zero JavaScript to the client by default, using the islands architecture so only explicitly opted-in components are hydrated in the browser.
- [Fresh 1.3 – Simplified Route Components and More](https://swe.quest/articles/fresh-1-3-simplified-route-components-and-more-3694b69f8671c9dd.md): Deno · 2023-07-18 · Medium · 6 min read · Frontend, TypeScript
  Fresh 1.3 lets route components be async functions that load data directly, removing the handler-plus-props-interface boilerplate, while the existing ctx.render() pattern keeps working.
- [A Gentle Introduction to Islands](https://swe.quest/articles/a-gentle-introduction-to-islands-51c545953d15b8b9.md): Deno · 2023-04-26 · Medium · 10 min read · Frontend, Web performance, JavaScript, TypeScript
  Islands architecture renders pages as static HTML and hydrates only isolated interactive Preact components, avoiding the whole-page, top-down hydration that ships framework JS even for static content.
- [Fresh 1.2 – welcoming a full-time maintainer, sharing state between islands, limited npm support, and more](https://swe.quest/articles/fresh-1-2-welcoming-a-full-time-maintainer-sharing-state-between-islands-ccf0a74d8fb68678.md): Deno · 2023-06-15 · Medium · 7 min read · Frontend, JavaScript, TypeScript
  Fresh 1.2 brings on Preact maintainer Marvin Hagemeister as full-time lead after a backlog of 60+ unreviewed PRs, and ships features centred on islands.
- [Fresh 1.5: Partials, client side navigation and more](https://swe.quest/articles/fresh-1-5-partials-client-side-navigation-and-more-9cde9f664f462089.md): Deno · 2023-10-10 · Medium · 7 min read · Frontend, JavaScript, TypeScript
  Fresh 1.5 introduces Partials, a client-side navigation model where marked regions of a page are swapped with server-rendered HTML without a full reload, preserving island state.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
