nowfound

Dev tools · July 30, 2012

Invalidate browser cache of Django static files automatically

File hash GET parameters for Django staticfiles. GitHub Gist: instantly share code, notes, and snippets.

Invalidate browser cache of Django static files automatically launched on July 30, 2012 with 8 votes, #88 of 375 launches that month and more than 50% of that year's launches. The site was still online in September 2026, 14 years on.

Visit gist.github.com ↗Alternativestop 23% of July 2012

What it does

A class for the static files app in Django that invalidates outdated browser cache. to your settings.py and everywhere you use the 'static' templatetag it will append a hash calculated form the contents of the file as a GET parameter at the end of the URL for the file. Example: This guarantees that every time you update your static files, whether it is an image, a CSS file or anything else, all browsers fetch the new version of the file instead of using their cached versions. Remember to change the import path to match your setup (replace the 'path.to' with your actual import path). You can reduce the time it takes to return the URL by caching the hashes when they are first calculated. The…from gist.github.com

Does a similar job

all alternatives →

More dev tools this month

the category →
  • /dev/null▲489

    a social network for devs

    Dev tools · 3d ago · dev-null.sh

  • open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.

    Dev tools · 28d ago · github.com

  • Contribute to reladraw/reladraw development by creating an account on GitHub.

    Dev tools · 26d ago · github.com

  • OpenBot▲362

    Grok Bot alternative: free, local, open-source, multiplayer

    Dev tools · 23d ago · openbot.run

  • Talanoa▲346

    Hi HN, I’m a fullstack developer, and honestly, I’ve lost count of how many side projects I’ve worked on over the years. But one idea kept coming back to me: a different kind of email client. It first came to me in 2014: “What if we could handle emails more like conversations?” Every year, I’d revisit this concept in my “Build Notes.” Ten years later, no one had built exactly what I had in mind — so I finally decided to do it myself. That’s how Talanoa was born. I wanted something focused on people, not timelines. I was tired of marking messages as unread just to remember to reply later, or…

    Dev tools · 21d ago · talanoa.email

  • CoreSpeed▲332

    One MCP for everything your agents need: apps, memory, tools

    Dev tools · 29d ago · corespeed.io

Source: Show HN post ↗

Launched alongside, July 2012

the whole month →