petrapixel

petrapixel.neocities.org

3,252,118 views
2,103 followers
527 updates
0 tips
i am asking yet again whether anyone knows a better solution to the cache issue than the ol' ?nocache= trick. it just seems like there HAS to be a better way of making sure the newest version is loaded >.<
8 likes
shishka's avatar shishka 10 months ago

for css caching? i have been renaming my css file every time i update it 👽💧 whether or not this actually works is a mystery

1 like
petrapixel's avatar petrapixel 10 months ago

@shishka yeah that's essentially what i've been doing ^^;

1 like
kuroi's avatar kuroi 10 months ago

there's also adding the version (?v=123) in front of your css name and changing it everytime you update it like

1 like
kuroi's avatar kuroi 10 months ago

neocities doesnt let me post html text lol, i meant in your css tag, it would look like href="style.css?v=12345678"

1 like
petrapixel's avatar petrapixel 10 months ago

@kuroi yes that's what i mean with "?nocache= trick" !

2 likes
kuroi's avatar kuroi 10 months ago

oof right, i thought you meant the meta tag, the one that goes meta http-equiv="cache-control" content="no-cache", i've never tested this one but maybe that could work for you

2 likes
petrapixel's avatar petrapixel 10 months ago

@kuroi oh interesting, i will look into that, thanks!

2 likes
dabric's avatar dabric 10 months ago

i think you're already doing the best solution... even professional website frameworks will do something similar and automatically rename files to get around the cache

dabric's avatar dabric 10 months ago

also, meta http-equiv="cache-control" content="no-cache" isn't in HTML 5 anymore, so I would take care using it!

petrapixel's avatar petrapixel 10 months ago

@dabric yes i found that info too. damn. but i'm currently looking into using a service worker for cachebusting, i'll try it out and if it works i will make a tutorial :]

1 like
underwhite's avatar underwhite 10 months ago

if you don't wanna use the CSS cache and no queries, do a hard reload on your site (command/ctrl+shift+r on chrome, search for other browsers) removes all cache backup if the site is supposed to be changed but is not doing it because of cache backups

petrapixel's avatar petrapixel 10 months ago

@underwhite yes i know about that one! i'm looking for a solution that also fixes it for my visitors

1 like
petrapixel's avatar petrapixel 10 months ago

Just sent support an email about this bc using the .htaccess doesn't seem to be an option on Neocities -- Let's see if I'll hear back!

underwhite's avatar underwhite 9 months ago

@petrapixel you can encourage your visitors to do a hard reload on your index page if that's supposed to be changed

Website Stats

Last updated 2 days ago
CreatedNov 9, 2021
Site Traffic Stats

Tags

personal resources programming coding tutorials