• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
postpostscript

postpostscript

ReloadScript

Remix of stevekrouse/ReloadScript
Public
Like
ReloadScript
Home
Code
2
README.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
README.md

ReloadScript: Reload HTML pages on new versions a val or its dependencies

Setup

  1. Fork this val
  2. Include ReloadScript(import.meta.url) in your HTML output

Example

Create val
import { htmlResponse } from "https://esm.town/v/postpostscript/htmlComponentLibrary"; import { ReloadScript } from "https://esm.town/v/[username]/ReloadScript"; export default async function(req: Request): Promise<Response> { return htmlResponse` It worked!!! ${Math.random()} ${ReloadScript(import.meta.url)} `; }

Todo

  • use import list to pare down dependency list and prevent unnecessary reloads

forked from @stevekrouse/ReloadScript

Code
README.mdmain.tsx
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.