Page 1 of 1

Why random and media?

PostPosted: Wed Oct 03, 2007 10:13 am
by esesoyyo
Why this terms in the HTML code (HEAD section)?
'random' and 'media'.
<link type="text/css" rel="stylesheet" href="dhtmlgoodies_calendar/dhtmlgoodies_calendar.css?random=20051112" media="screen"></LINK>
<SCRIPT type="text/javascript" src="dhtmlgoodies_calendar/dhtmlgoodies_calendar.js?random=20060118"></script>

PostPosted: Wed Oct 03, 2007 1:01 pm
by Batalf

You shouldn't have to use media="screen". You can use media="all" to identify that the CSS is for both screen and print.

The random value is something I just used to prevent users from getting a cached version of the css file. When I made an update to the css file, I changed the value of the random attribute so that the browser thinks it's a new file, i.e. it searches for it on my server instead of in the local cache.