Hi, I am making a website in html & php, but the stylesheet doesn’t work! Here’s the code:
`
Games - Freeranger studios
How can I make this work? My website URL is freerangerstudios.ga/games.
Thanks!
Hi, I am making a website in html & php, but the stylesheet doesn’t work! Here’s the code:
`
Games - Freeranger studios
How can I make this work? My website URL is freerangerstudios.ga/games.
Thanks!
Fixed it!
One more problem: Now, I can’t update the CSS! It doesn’t use my changes! What’s going on?
@Freeranger said:
One more problem: Now, I can’t update the CSS! It doesn’t use my changes! What’s going on?
Do you use Cloudflare?
Cloudflare will cache the CSS file’s so try to purge your Cloudflare cache.
If you don’t use Cloudflare then hit Ctrl + F5
@PlanetGamingGG said:
@Freeranger said:
One more problem: Now, I can’t update the CSS! It doesn’t use my changes! What’s going on?Do you use Cloudflare?
Cloudflare will cache the CSS file’s so try to purge your Cloudflare cache.
If you don’t use Cloudflare then hit Ctrl + F5
This here is the right answer. Your website uses Cloudflare and one of the speed optimizations Cloudflare does is serving old CSS and JS files for a while. You can clear Cloudflare’s cache or enable development mode (which temporarily disables cache) through Cloudflare’s website.
Thanks! It’s still kinda slow, so I think I’ll go for stylesheet inside the php instead. Thanks!
@Freeranger said:
Thanks! It’s still kinda slow, so I think I’ll go for stylesheet inside the php instead. Thanks!
That pretty much removes the point of using Cloudflare in the first place. If you don’t want cache, you can just disable Cloudflare too.
Yeah, but I do still want SSL…
And I want the caching when I’m not developing, but they seem to hav some struggle with developer mode…
@Freeranger said:
And I want the caching when I’m not developing, but they seem to hav some struggle with developer mode…
Then you could try asking Cloudflare about it instead. Cloudflare staff probably knows more about Cloudflare than anyone here.
Ok, thanks!
On your index.php file where your importing your stylesheet add ?v=<?php echo time() ?> and this will make the cache load it each time and you will be able to have the cache to make your site faster.
<link rel="stylesheet" type="text/css" href="/style.css">
to
<link rel="stylesheet" type="text/css" href="/style.css?v=<?php echo time() ?>
Thanks, I’ll do that immediately!