Tell me more ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

The URLs for CSS files in Salesforce resemble this:

/sCSS/25.0/sprites/1344400715000/Theme3/default/gc/elements.css

What does the 1344400715000 refer to, and is there a way to expose that value via global variables? I know that I could find it retroactively with this javascript:

var reg = /\d{13}/;
var cssurl = document.getElementsByTagName('link')[0];
var mystery = cssurl.match(reg)[0]

But I'd love a way to find it proactively.

share|improve this question
The links Using Salesforce Styles and Using the Salesforce CSS in Your Apps may help. The latter now redirects to a page of links. For some reason I thought it used to have more specific details. – Daniel Ballinger Aug 14 '12 at 22:36

2 Answers

up vote 4 down vote accepted

You don't really need the number. Its just for Cache busting.

/sCSS/25.0/sprites/1344400715000/Theme3/default/gc/elements.css

and

/sCSS/25.0/sprites/000001000000/Theme3/default/gc/elements.css

should work the exact same.

Also note the /gc/ indicates that this is the Google Chrome stylesheet, since its possible for the CSS to have special rules for different browsers. Again you don't need to worry about this now, as the browsers CSS that your using is served, not what is requested, but that could change in the future.

share|improve this answer

Are you familiar with static resources? It is the same principle, the 1344400715000 is the last modified date. And because these are Salesforce system "static resources" they are not accessible.

A partially documented feature of static resources is that you can drop the 1344400715000 so I just tested it and it seems to work too:

/sCSS/25.0/sprites/Theme3/default/gc/elements.css

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.