3

let's say i have this css file named imported.css, then inside the imported.css file, all the css used in the site are dumped within, e.g

@import url('a.css');
@import url('b.css');
@import url('c.css');
@import url('d.css');
@import url('e.css');
@import url('f.css');

so the import.css file is being called in the main layout...now the problem is, am having problem with css being cache at the end users' browsers..how will i add the version number to those css inside the import.css file ?.. will e.g

@import url('a.css?v=1');

work ?

or should i just add the version number at the import.css?v=1 ?

3

1 Answer 1

0

You should add a version number for each file - the caching mechanism doesn't care about how they're loaded, only what their URLs are.

Sign up to request clarification or add additional context in comments.

2 Comments

so you mean to say, i should leave the import.css file? only the files that are inside it should contain version number ?
You should do every file, including import.css. Otherwise that will be cached, and when you come to add g.css at some time in the future, it won't be picked up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.