I use notepad to edit the style sheet directly. Then I refresh the page and validated the stylesheet still in old status. (use F12 browser developer tool to validate)

In the Master page I added "v=1" or "v=10" or "v=whatever" like below:

 name="/_layouts/mycompany/styles/OverallStyles.css?v=2" runat="server"
after="SharepointCssFile" />

However the page still not load the updated CSS. I have also tried ctrl+F5 to reload but no help. What should I do?

| improve this question | | | | |
  • You should not add v= in CssRegistration, SharePoint internally adds a hash to it if I do not misremember – Robert Lindgren May 21 '14 at 8:42
  • Try to add ?rev=1 instead of ?v=1 – user2536 May 21 '14 at 8:43
  • I want to add that I am working on a site collection migrated from SP2010. I create an evaluation site from the real site and modify the css to see what happen. Would it matter? – Mark L May 21 '14 at 8:45

Since you are using an evaluation site after migrating from SP 2010 to SP 2013, you should change the CSS path to reflect the file from 15 hive. name="/_layouts/15/mycompany/styles/OverallStyles.css

So, make changes in the CSS file present in 15 hive instead of 14 hive in order to see the changes. Moreover, if you are using IE, Right Click on the browser and click on Start In Private Browsing.

| improve this answer | | | | |
  • May I know how to change? In the Master page I only see <SharePoint:CssRegistration name="/_layouts/mycompany/styles/OverallStyles.css" runat="server" after="SharepointCssFile"/> There is no 14 or 15. – Mark L May 21 '14 at 9:07
  • Simply append 15 after /_layouts/ – Nadeem Yousuf-AIS May 21 '14 at 9:14
  • by unknown reason, I added 15 like <SharePoint:CssRegistration name="/15/template/_layouts/mycompany/styles/style.css" ... The IE developer tool said I am loading above css as well. However it actually STILL loading 14. I think it is some "feature" of evaluation site. – Mark L May 23 '14 at 6:01
  • template should not be added in the path. – Nadeem Yousuf-AIS May 23 '14 at 6:14
  • I have tried /_layouts/mycompany/develop/styles/style.css or /15/_layouts/BOCHK/develop/styles/style.css both will use the style.css in 14hive – Mark L Jun 4 '14 at 3:04

I am really sorry everyone. After review the answers I just happen to know what is the issue.

Background: I am migrating a site collection from sp2010 to sp2013. I created a evaluation site and work on the style on the eval site (with URL like: http://sp/sites/mysite-eval)

Since mysite-eval is running in SP2013 mode, I went to hive 15 (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\mycompany\styles) to edit the stylesheet.

But in fact the stylesheet is in hive 14 (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\mycompany\styles).

Why a SP2013 site refer to hive 14? Is this design by purpose or mistake?

| improve this answer | | | | |

As I undersatnd your CSS file is in Style library. Check if your your CSS file properly checked in and also try app-pool recyle or IISReset.

| improve this answer | | | | |
  • He specifically says it's in _layouts. Doing an IISReset for updating CSS is not to be advised – tarjeieo May 21 '14 at 8:31
  • He tagged the style -library. – Aanchal May 21 '14 at 8:37
  • I am sorry and yes, my css file is in layout folder. I have tried iisreset anyway but still not update. – Mark L May 21 '14 at 8:41

Make sure you updated the CSS in the right place, which for _layouts would be something like 15/TEMPLATE/LAYOUTS/yourproject/somestyle.css

Also make sure you remembered to update the CSS on (all) frontend servers.

| improve this answer | | | | |
  • I'm sorry. Just edit my question again. I only have one WFE and I update the css file directly in the Layout folder. – Mark L May 21 '14 at 8:41
  • What is the generated link-reference if you view source? Does your new query params take effect? – tarjeieo May 21 '14 at 8:43
  • I add a new line at the bottom of css file. Then I reload the page in browser and see no change. I use F12 dev tool> CSS tab to check the content of my css. The new added lines are not exist. – Mark L May 21 '14 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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