CodeIgniter Forums
CSS files that have numbers in their query string - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: CSS files that have numbers in their query string (/showthread.php?tid=31271)



CSS files that have numbers in their query string - El Forum - 06-12-2010

[eluser]huuray[/eluser]
hi all.
any libraries to generate expires for css?
something like this
Code:
<link href="/stylesheets/blueprint/screen.css?1268721265" media="screen, projection" rel="stylesheet" type="text/css" />
<link href="/stylesheets/blueprint/print.css?1268721265" media="print" rel="stylesheet" type="text/css" />

original stackoverflow posted here


CSS files that have numbers in their query string - El Forum - 06-12-2010

[eluser]Unknown[/eluser]
Most people just use the current Unix time, as it will always be a different number.


CSS files that have numbers in their query string - El Forum - 06-12-2010

[eluser]Matthieu Fauveau[/eluser]
Hi huuray,

I personally use PHP's filemtime().


CSS files that have numbers in their query string - El Forum - 06-12-2010

[eluser]WanWizard[/eluser]
Make that +1.

It keeps the URL the same as long as the file hasn't changed.


CSS files that have numbers in their query string - El Forum - 06-12-2010

[eluser]huuray[/eluser]
thanks for reply all.