Offline-First Browsing

Offline-First Browsing

Offline-First Browsing

Hologram enables true offline-first TELA browsing. Clone your favorite dApps locally, cache them in Graviton storage, and access them instantly—no network, no Gnomon, no waiting.

Your data, your machine, your rules. Once synced, TELA apps load from local storage with zero network latency. Combine with Privacy Mode for complete network isolation.

Why Offline-First?

Traditional WebHologram Offline-First
Fetch from server every timeCached locally in Graviton
Requires network connectionWorks completely offline
Depends on external servicesSelf-sovereign operation
Servers can go downContent lives on your machine
CDNs track your requestsZero network fingerprinting

How It Works

  1. Favorite apps in the Discover tab
  2. Sync Manager fetches and caches them locally (filtered by rating)
  3. Graviton storage holds the cached content
  4. TELA Browser loads instantly from local cache

Getting Started

Favorite Your Apps

Browse TELA apps in the Discover tab (powered by the TELA Browser) and click the heart icon to add them to your favorites. Favorites are stored locally and persist across sessions.

Open Sync Manager

Navigate to Settings → Sync Manager to access batch sync controls.

Configure Rating Threshold

Use the slider to set a minimum rating (0-99). Apps rated below this threshold will be skipped during sync—useful for filtering out low-quality or potentially malicious content.

Sync Favorites

Click "Sync Favorites" to batch-prefetch all favorited apps that meet your rating threshold.

For each favorite app:

  1. Resolve dURL to SCID
  2. Check rating against threshold
  3. If passes: fetch from blockchain → store in cache
  4. If fails: skip

Sync Manager Features

Batch Prefetch

Prefetch all favorites in one operation:

BatchPrefetchFavorites(favorites, minRating) → {
    prefetched: 5,
    already_cached: 3,
    skipped: 1,       // Below rating threshold
    failed: 0,
    duration_ms: 2340
}

Update Checking

Compare all cached apps against their current on-chain versions:

CheckAllForUpdates() → {
    total_checked: 8,
    updates_found: 2,
    apps: [
        { scid: "abc...", cached_version: 3, onchain_version: 5, has_update: true },
        { scid: "def...", cached_version: 7, onchain_version: 7, has_update: false }
    ]
}
⚠️

Update checking requires a connection to a DERO daemon to fetch current SC state. Once you've reviewed and accepted updates, you're back to fully offline operation.

Visual Diffing

Before updating, view exactly what changed:

DiffCachedVsOnChain(scid) → {
    has_changes: true,
    lines_added: 42,
    lines_removed: 12,
    lines_modified: 8,
    diff: [
        { type: "added", line_num: 15, content: "const newFeature = true;" },
        { type: "removed", line_num: 22, content: "// old comment" }
    ]
}

The diff viewer shows:

  • Green (+): New lines added
  • Red (-): Lines removed
  • Yellow (~): Lines modified

Selective Updates

You're always in control:

  • Review diffs before updating
  • Update individual apps (not all-or-nothing)
  • Keep your preferred version indefinitely
  • Roll back by re-cloning at specific commit

Offline Cache Management

Settings → Offline Cache

The Offline Cache Manager shows:

StatDescription
Cached AppsNumber of apps stored locally
FilesTotal file count across all apps
UsedCurrent cache size
Max SizeConfigurable limit (default 500MB)

Cache Behavior

  • LRU Eviction: Oldest-accessed apps are removed when space is needed
  • Complete vs Partial: Full app caches include all assets
  • Version Tracking: Each cached app tracks its blockchain version
  • Content Hashing: SHA256 verification ensures integrity

API Reference

Prefetch

// Cache a single app
PrefetchApp(scid string) → {
    success: true,
    app: CachedApp,
    message: "Cached AppName for offline use"
}
 
// Batch cache favorites
BatchPrefetchFavorites(favorites []map, minRating int) → BatchSyncResult

Query

// Check if app is cached
IsAppCachedOffline(scid string) → { cached: bool, app: CachedApp }
 
// Get all cached apps
GetCachedApps() → { apps: []CachedApp, count: int }
 
// Get cache statistics
GetOfflineCacheStats() → {
    stats: CacheStats,
    max_size: 524288000,
    usage_percent: 42.5
}

Manage

// Remove specific app
RemoveCachedApp(scid string) → { success: true }
 
// Clear entire cache
ClearOfflineCache() → { success: true, message: "Cache cleared" }
 
// Update cached app to latest
UpdateCachedApp(scid string) → { success: true, updated: true }

Version Control Integration

TELA's built-in commit system enables powerful version control:

Cached Version Tracking

Each cached app stores:

type CachedApp struct {
    SCID            string    // App identifier
    Version         int       // Cached commit number
    OnChainVersion  int       // Latest blockchain version
    HasUpdate       bool      // True if update available
    LastSyncCheck   time.Time // When we last checked
    ContentHash     string    // SHA256 for verification
}

Clone at Commit

For filesystem access (vs Graviton cache), use Clone with version pinning:

scid@txid → Clone at specific commit

This downloads the exact version specified, regardless of current on-chain state.

Security Considerations

Rating Threshold

The minimum rating filter provides a first-line defense:

RatingTypical Meaning
0-9Flagged as malicious
10-49Unverified/new apps
50-79Community-vetted
80-99Highly trusted
⚠️

Ratings are community-driven and not a guarantee of safety. Always review diffs before updating and be cautious with apps from unknown developers.

Content Verification

  • All cached content is fetched from immutable blockchain storage
  • Content hashes can verify integrity
  • Diffing shows exact changes before updating
  • You control when (and if) to update

Performance

OperationTypical Time
Load cached app< 50ms
Check single app for updates~200ms
Batch check 10 apps~1.5s
Prefetch single app1-3s
Batch prefetch 10 apps10-30s

After initial sync, apps load from local Graviton storage in under 50ms—faster than any CDN.

Use Cases

Daily Driver Setup

  1. Favorite your essential dApps
  2. Sync with rating threshold 50+
  3. Check for updates weekly
  4. Review diffs before updating

Air-Gapped Operation

  1. Sync favorites on connected machine
  2. Transfer Graviton cache to air-gapped system
  3. Run Hologram completely offline
  4. Periodically connect to sync updates

Version Pinning

  1. Find stable version of critical app
  2. Clone at that commit (scid@txid)
  3. Never auto-update
  4. Manually review all updates before applying

Benefits

Offline-first browsing provides:

  • Self-sovereignty: Your apps, your machine, your rules
  • Privacy: No network requests after sync
  • Resilience: Works when network is down
  • Verification: See exactly what changed before updating
  • Control: You decide when to update (or not)