Find your content:

Search form

You are here

What are the components of Salesforce's built-in CSS URLs?

 
Share

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.


Attribution to: Benj

Possible Suggestion/Solution #1

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


Attribution to: Daniel Blackhall

Possible Suggestion/Solution #2

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.


Attribution to: Kris Gray
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/401

My Block Status

My Block Content