HUDL.NET

How to bypass Byethost (or other hosting) CSS caching?

So you updated your css file, clicked reload and the changes didn't appear until a few minutes later? Because the basic hosting at Byethost is free they are saving some resources by caching your stylesheet. It's harmless unless you are using their otherwise excellent service for development.
Well... good news. There is a rather simple workaround. You just have to trick the server into 'thinking' that you renamed your .css file and thus making it recache it.

Insert this line in the <head> section of your page:

<link rel="stylesheet" type="text/css" href="/path/to/your/stylesheet<?php print('?'.filemtime('stil.css'));?>"/>



This will insert a question mark and a number representing the time the file was last modyfied and so tricking the server wih a 'new' filename :D Update at will!

Of course your page has to be .php or the code will not work :D

Have fun!