Categories: Report an Issue : Mac :

Chrome barfing on CSS on Refresh?

Showing 1-79 of 79 messages
Chrome barfing on CSS on Refresh? Gog Ogo 3/28/13 9:53 AM
Chrome Version: 26.0.1410.43
Operating System: OS X, Windows 7
Extensions: None.

Hi:

We have a page that loads fine the first time, but when the user refreshes the page, Chrome seems to ignore some CSS. A second refresh appears to cause even more CSS to be ignored, making the screen look like what sometimes happens after a long night of drinking (and consuming HTML).

Other browsers don't do this, and it appears to be specific to the version of Chrome I mentioned above. We've been able to reproduce the problem on Windows, as well.

Does anybody know what's up with that?

Thanks,
Greg

Re: Chrome barfing on CSS on Refresh? Gog Ogo 3/28/13 2:42 PM
Here's an example site:

https://learndev.unm.edu/

Thanks,
Greg

Re: Chrome barfing on CSS on Refresh? Charlie Zhang 4/2/13 11:42 AM
We are also seeing this at kidobi.com with the latest version (26) of Chrome.

We are running via IIS 6 on a Windows Server 2008 EC2 instance using ASP.NET.

Some observations:
- our CSS loads with 200 (OK) response and MIME type text/css on the first attempt, which correctly loads the page
- upon refresh, the browser gets a 304 response (not modified) and loads the CSS MIME type text/html, and results in a page lacking any css formatting

Re: Chrome barfing on CSS on Refresh? Charlie Zhang 4/2/13 11:49 AM
This occurs on both windows and macOS:
- Win 7 Ultimate 64-bit SP1
- MacOS 10.7.5
Re: Chrome barfing on CSS on Refresh? Johny Woller Skovdal 4/3/13 5:36 AM
I'm also having the exact same issue with this version of Chrome. Also, when using Fiddler to monitor traffic, it seems that Chrome does not make a request for the CSS file in the incidents where the CSS does not load.
Re: Chrome barfing on CSS on Refresh? Charlie Zhang 4/3/13 8:28 AM
Yesterday we found that removing the following CSS for our background image was making the difference between successfully refreshing and not:

.body
{
    background:#b4dfff url(/images/backgrounds/background.jpg) no-repeat fixed top;
    text-align:left;
    font-family: Helvetica, Arial, sans-serif;
    color: #585858;
    font-size: 12px;         }

We replaced that line with the following, which temporarily fixed our issue:

body
{
    background-color:#b4dfff;
    text-align:left;
    font-family:Helvetica, Arial, sans-serif;
    color:#585858;
    font-size:12px;
}

However, today the problem seems to have returned, albeit slightly less frequently than yesterday.

Re: Chrome barfing on CSS on Refresh? Charlie Zhang 4/3/13 12:13 PM
We were able to work around this issue until a definitive solution is found by turning off ETags and setting no-cache in HTTP header.
Re: Chrome barfing on CSS on Refresh? Johny Woller Skovdal 4/3/13 11:33 PM
Can anyone else confirm this work around has worked for them?
Re: Chrome barfing on CSS on Refresh? Nikolaj Pedersen 4/4/13 1:49 AM
Worked for us it seems.

Our Ajax requests started to be returned as "304 Not Modified".
The first request is ok, and the next (same request parameters) then return 304.
Cache-Control set to: no-cache on web-server.

The second Ajax has the data, but changes Content-Type to text/html.
This causes our jQuery Ajax to return the data as a string, and not parse the JSON into an object.
And our other code then does not run..

Is this a Chrome bug, or is this intended behaviour?
how do we then disable caching in Chrome 26?

.nikolaj pedersen

Re: Chrome barfing on CSS on Refresh? Raverken 4/4/13 4:55 AM
We had the same problem - apparently sometimes the content-type header is set to 'text/plain' on 304 responses for css-pages (we had this on our blackboard servers). 304-responses shouldn't set a content-type (and certainly not the wrong one), so we now have our loadbalancer drop all content-type headers from 304-responses. This solved the problem for us.
(unknown) 4/4/13 8:06 AM <This message has been deleted.>
Re: Chrome barfing on CSS on Refresh? Charlie Zhang 4/4/13 8:16 AM
Deleting previous reply about forcing content-type to "text/css". That worked for about 30 minutes and then stopped working.
Re: Chrome barfing on CSS on Refresh? lloydphillips 4/9/13 1:51 PM
Are you using jQuery. Might be totally unrelated but I came across this looking for issues with Chrome 26 on .net. We have had our intranet web app die this week and I think it was a Chrome update as Firefox is fine. Another site replicates and matches our issue quite closely:

http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/google-chrome-26-performance-issue.aspx#2572467

I'm just wondering if CSS is not your issue. Or conversely, is actually part of mine also. Someone mentioned the 304 responses on AJAX also, we've noticed that too.

Re: Chrome barfing on CSS on Refresh? Ryan Yoder 4/9/13 4:39 PM
Hah.  I have the same exact problem.
It is a Blackboard content server issue for me and I cannot workaround it unless I host my files for class elsewhere.
I get a text/css for the first load and the subsequent loads return 304 not modified with text/html.  Very annoying.
Re: Chrome barfing on CSS on Refresh? Gog Ogo 4/10/13 3:19 PM
No, there's no jQuery in the application.

Thanks,
Greg

Re: Chrome barfing on CSS on Refresh? Gog Ogo 4/10/13 4:04 PM
Interesting. It's a Bb server for us, too.

Greg

Re: Chrome barfing on CSS on Refresh? Kristopher Winkler 4/11/13 9:18 AM
Ours site does this as well but only on certain pages and once F5/Refresh is done, it continues to display with stripped out CSS until we close Chrome and reopen the site new.  Multiple refreshes does not bring it back nor strip out 'more'.  We tried the work around by turning off ETags and setting no-cache in HTTP header which seemed to work at first.  Then 20 minutes or so later it was still doing it...
Re: Chrome barfing on CSS on Refresh? Kristopher Winkler 4/12/13 9:15 AM
Is Google aware of this issue?  Will there be a fix?  Obviously with the popularity of Google Chrome there are a lot of users/websites that will have this issue until it is fixed.  

To recap:  When go to our home page and hit F5 (refresh) it strips out the CSS. I am trying to work around this as we want to auto-fresh our pages after cart load to update the cart quantity in header, but when it auto-refreshes (just like when done manually with F5) it shows this horrid looking page with no CSS applied.... And hitting F5 again does not help. We need to close Chrome or go back and then enter the page again for it to show correctly. One of the suggested temp workarounds was the etag thing. However, I tried it and it seemed to help for a little bit, but then the issue came back again, albeit it seems with less occurrences....

Just wondering if there is a temp or permanent solution in the works?

Thanks!

Re: Chrome barfing on CSS on Refresh? John af Petersens 4/14/13 3:24 AM
We also had this issue. After some extensive testing I had to implement a very ugly temporary solution to this issue.
We added a random number after the link to sylesheets. This forces chrome to get the css for evry request:

ASP.net Code:
<link rel="stylesheet" type="text/css" media="screen" href="/Style/Style.css?v=") + =RandomNumber() %>"  />

This solved the issue for now.
Obviously not a nice solution but i had no choice since chrome was unusable on our page.
 

Re: Chrome barfing on CSS on Refresh? pinturicchio 4/15/13 1:16 AM
Hi all,

I am experiencing the same problem and found out that loading css dynamically (like this for example http://www.javascriptkit.com/javatutors/loadjavascriptcss.shtml ) avoids the problem.

However now I keep on with the tests.


Re: Chrome barfing on CSS on Refresh? pinturicchio 4/15/13 1:19 AM
No the problem sometimes appears again...

So frustrating and it seems to appear only with Chrome 26

Re: Chrome barfing on CSS on Refresh? pinturicchio 4/15/13 2:23 AM
I found out that responses without body (like 304) SHOULD not contain a content-type header: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5 .

Infact removing the header from the response avoid the problem in Google Chrome 26

Re: Chrome barfing on CSS on Refresh? Kristopher Winkler 4/16/13 9:40 AM
So you found a solution?  Is it working permanently?  And if it is, how would one go about "removing the header from the response"?  Thanks!!
Re: Chrome barfing on CSS on Refresh? pinturicchio 4/16/13 1:00 PM
Yes the solution is working perfectly and permanently.

The fact is that the response coming from the server is note served correctly.
A 304 answer SHOULD not containt a "body" and the "content-type" header so the bug is on the server and not on the client (yes of course Chrome could ignore the "content-type" but this is another story).
You have to fix the server in order to remove the content-type.

Re: Chrome barfing on CSS on Refresh? Charlie Zhang 4/16/13 1:42 PM
Does anyone know how to remove content-type field from 304 response?

We are on AWS EC2 instance running Windows Server 2008 with IIS6, using ASP.NET. This would be a more elegant solution than disabling caching of css that we are currently doing.

Re: Chrome barfing on CSS on Refresh? Kristopher Winkler 4/16/13 3:32 PM
Also how to on Apache?  

And while testing, we found that if we clear the cache in the browser we can refresh the page all we want with no CSS issues.  However, if we close and reopen Chrome then the refresh issue reappears.

Re: Chrome barfing on CSS on Refresh? pinturicchio 4/16/13 3:46 PM
Removing the header is platform dependent: you have to check or "intercept" where the response is filled in the server (Asp.net / Apache ore whatsoever) and remove the "content-type" header.

Re: Chrome barfing on CSS on Refresh? Kristopher Winkler 4/18/13 2:16 PM
This is not working or I am not understanding.  I tried to unset the header in the htaccess but it does not allow you to unset the content-type.  I instead tried to set the content-type with a blank value, which returned a content-type header response of nothing/blank.  However the issue is still there....  I did notice if I force no cache through the HTaccess, which obviously causes increased load time, the issue goes away.  But every page has to reload without cache and it significantly increases my load times....
Re: Chrome barfing on CSS on Refresh? Kristopher Winkler 4/18/13 2:54 PM
Shift-F5 does NOT cause the issue for us...
Re: Chrome barfing on CSS on Refresh? Kristopher Winkler 4/18/13 10:31 PM
We really can't do anything about whether or not Apache or LiteSpeed are following the HTTP RFC properly. Sending a body and content-type header are extremely common for any response, and "SHOULD" if an RFC is stating what the writer would prefer. In an RFC, "MUST" is the only thing of any real significance. If a server "should" do something, the client "must not" break because it didn't do so.
Re: Chrome barfing on CSS on Refresh? Tommos 4/20/13 2:27 AM
Hi,
I experience the same issues on Linux, especially when developing web applications locally. Started as soon as I upgraded to version 26. Very annoying. Firefox does not have the issue. Disabling the cache is a work-around, so this is definitely a bug related to the way Chrome deals with cache and redirections.
But I do not see a good reason to break thinks due to a content-type set.
Re: Chrome barfing on CSS on Refresh? pinturicchio 4/21/13 12:36 PM
instead of removing it try to set  "content-type" to "text/css"
Re: Chrome barfing on CSS on Refresh? Maarten Bos 4/22/13 6:37 AM
Just to inform others, we had the same issue on our project.
Environment: SharePoint 2010 with lots of custom code, masterpage, javascript & css

Eventually after reading this thread and trying some possible solutions I found out that in our case the styling seemed to be gone because it was loaded by being nested inside a CSS file:

For instance
mainfile.css
@import "another.css";
@import "font-awesome.css";

After moving these references back into the masterpage our problem seems gone.
It really appears as if Chrome does load the CSS files from cache, even with the wrong content-type, but does NOT parse these files anymore so that in this case the imports were skipped.

Btw another workaround is to include something like a random number to the file to prevent caching. The following line will work within a SharePoint 2010 masterpage:
<script>document.write('<link rel="stylesheet" type="text/css" media="screen" href="/Style%20Library/package/css/mainfile.css?v=' + Math.floor((Math.random()*1000)+1) + '"></' + 'link>');</script>

Re: Chrome barfing on CSS on Refresh? Anton Cheshkov 4/29/13 1:42 AM
The same problem!

Chrome Version 26.0.1410.43
Ubuntu 12.04

Re: Chrome barfing on CSS on Refresh? Noël 5/6/13 11:32 AM
Is this what is happening with my site?  Using Ajax and Jquery for resizing, works perfectly in every browser, but in Chrome, specifically Mac (works on Windows) it doesn't load properly unless you enter the website manually into the search bar.  On refresh, the relative CSS is not functioning 100% of the time, and when people follow links to the site. This isn't a caching problem because it happens to people visiting the site for the first time as well.  If you hit refresh a lot it sometimes loads properly.

http://noelwells.com

I'm using a template that I am modifying so I am having little support here. I can navigate my way through code but I am having a hard time troubleshooting the origin of this Chrome specific load bug.


Re: Chrome barfing on CSS on Refresh? William Y 5/8/13 9:39 PM
some problem here. but something interesting is when I using different js to reload page, it have different result,

window.location.reload() -> have problem
window.location.href=window.location.href  -> no problem
history.go(0)  -> noproblem

:( is that a problem on window.location.reload??

Re: Chrome barfing on CSS on Refresh? Mitch Chapman 5/15/13 8:11 AM
This really needs to be addressed!
Previous version(s) of Chrome did not exhibit this behavior!

Also Chrome seems to be selective about which .css files it chooses to ignore after a 304 text/plain response from the server.

Re: Chrome barfing on CSS on Refresh? Mitch Chapman 5/15/13 8:25 AM
Does anyone from Chrome team look at this forum?
Seriously this issue was mentioned on March 28th!
Re: Chrome barfing on CSS on Refresh? Sergio Augusto Vallejos Vivado 5/16/13 7:23 PM
Hi. I have this problem too. I'm developing a site, and i noticed that if i comment the load of the CCS in the header of the html, Chrome (v26) STILL shows the site styled.  That problem makes me test what happen if i SAVE the page (complete mode) to my disk, to check the CSS file for searching my updated code, and for my suprise, Chrome NOT save the pages, however it saves a lot of random data in files named .com.google.Chrome.0fdLK3 or .com.google.Chrome.0mWgg8 , etc (one level up in the folder i had choosen to save!)

I found this problem because while i'm coding, i always refresh the site to see changes, and today this browser stops refreshing some styles.

I readed all this thread. It surely has to do with the Cache system of Chrome or something like that.

I switched my way to Firefox until Google people find a solution.

Chromium v25 also has this problem.
I use jQuery and CSS on my site.

Bye.

Re: Chrome barfing on CSS on Refresh? Mitch Chapman 5/17/13 6:43 AM
Hm - I never saw this behavior on Chrome 25.
Re: Chrome barfing on CSS on Refresh? Anthony M Johnson 5/19/13 5:40 PM
Plenty of visitors to my site reporting seeing this with Chrome 26 and I can reproduce it easy. Site is running on nginx 1.5.0 and I'm seeing CSS files returned with HTTP 304 having a Content-Type header of "text/html" on refresh, at which point the page renders with no styling at all.

Like others, attempting to force this to text/css lessened the frequency of occurrence but it still continues to happen and it does often enough to be a problem.

Re: Chrome barfing on CSS on Refresh? Mitch Chapman 5/20/13 10:00 AM
Jacky from Chrome product community acknowledged this thread :)
Re: Chrome barfing on CSS on Refresh? Mitch Chapman 5/21/13 1:18 PM
Jacky, any update?
Re: Chrome barfing on CSS on Refresh? pinturicchio 5/22/13 4:53 AM
It seams that with chrome 27 the problem is not seen
Re: Chrome barfing on CSS on Refresh? Johny Woller Skovdal 5/22/13 5:11 AM
Good to know. Can others confirm this?
Re: Chrome barfing on CSS on Refresh? Kristopher Winkler 5/23/13 9:05 AM
Issue is still there for us when upgrading to 27...
Re: Chrome barfing on CSS on Refresh? eusonlito 5/26/13 2:42 PM
Same in Version 29.0.1516.3 dev (Ubuntu).

Screen and print CSS are mixed on refresh but works fine when Shift + Refresh.

(unknown) 5/27/13 11:44 AM <This message has been deleted.>
Re: Chrome barfing on CSS on Refresh? Mike Ruhlin 5/30/13 2:02 PM
Removing content-type header from 304 responses worked for me.

Right now I have specific code that checks for exact match to 304 and removes content-type.  Are there other status codes I need to worry about this happening with?

Re: Chrome barfing on CSS on Refresh? Hutchy68 6/8/13 4:52 PM
How are you doing that?

Yes, Google needs to address the 304 bug. I don't think it really is server error because the refresh starts to breaks in pieces.

I'm seeing 304 with proper mime types mixed in with the text/plain. They breakdown even more as you browse or refresh.

E.g. First 2 304's are set as text/plain. Then 3, then 5 and site is totally broken. Hard refresh always fixes but annoying. IE, Firefox, Opera not a single problem.

I've used chrome almost exclusively for over a year but I might be heading back to IE or Firefox(they've been a mess lately too). I can't do site work because Chrome keeps breaking the sites JS.

Re: Chrome barfing on CSS on Refresh? pinturicchio 6/10/13 6:13 AM
It is definetly a "server error" the error produces an answer that is not compliant to the standard.
The fact that other browsers and event chrome on previous versions accept a wrong answers it is not enough to say "It should be an acceptable answer".

Re: Chrome barfing on CSS on Refresh? Johny Woller Skovdal 6/10/13 6:23 AM
Can you elaborate on how the answer is not compliant with the standard? Only thing I've seen so far is that it's not adhering to a "should" in the standard, which is not something that should crash in a browser.
Re: Chrome barfing on CSS on Refresh? pinturicchio 6/10/13 6:30 AM
Exactly it SHOULD but this is a border line case. The answer produced by the server states that

1) the server produces an answer with content type
2) there is no content.

The browser is then not capable to understand what to do

Re: Chrome barfing on CSS on Refresh? Johny Woller Skovdal 6/10/13 6:40 AM
Of course it is! It responds with 304: "Just do the same as you did last time, nothing's changed". And ALL browsers has been capable to do that up until now. It's not something new. Chrome's way of reading it now is simply breaking a lot of websites.

Again, Chrome must be able to handle "SHOULD", or quite a lot of things will break across all the different kinds of webservers there are with each their own partially implemented version of the HTML standard.

Re: Chrome barfing on CSS on Refresh? pinturicchio 6/10/13 6:56 AM
I am not saying that chrome shouldn't be UPDATED I am only saying and I am 100% sure that the answer produced by those server is definetly wrong and not adhering to the standard
Again the fact that the answer is not 100% correct does not mean that chrome should not read it; i think it should however thos server must be FIXED since they are producing wrong answers!
Re: Chrome barfing on CSS on Refresh? Bibik 6/10/13 7:01 AM
Anybody aware how to fix this problem for IIS + ASP.NET? I really need it in next couple of days.
One of our large client is about to ditch Chrome altogether. As far as they are concerned if FF and IE can handle the page, but Chrome cannot - then the Chrome is broken. They could not care less about "border conditions" etc. Welcome to enterprise world, guys...
Re: Chrome barfing on CSS on Refresh? Maarten Bos 6/10/13 7:14 AM
On Monday, June 10, 2013 4:01:51 PM UTC+2, Bibik wrote:
> Anybody aware how to fix this problem for IIS + ASP.NET? I really need it in next couple of days.
> One of our large client is about to ditch Chrome altogether. As far as they are concerned if FF and IE can handle the page, but Chrome cannot - then the Chrome is broken. They could not care less about "border conditions" etc. Welcome to enterprise world, guys...

Are you using nested CSS files? (.css referenced from within other css files)
Ifso; move the reference to the html(aspx/masterpage/page layout), this fixed it for our IIS/ASP.Net/SharePoint solution.

Re: Chrome barfing on CSS on Refresh? Bibik 6/10/13 7:35 AM
>Are you using nested CSS files? (.css referenced from within other css files)
Ifso; move the reference to the html(aspx/masterpage/page layout), this fixed it for our IIS/ASP.Net/SharePoint solution.

Unfortunately, the bulk part of our CSS's come from a third-party library (DevExpress), and they serve their resources (JS, CSS, etc) using their own special handler. We do not have much control over what happens inside that handler.

Re: Chrome barfing on CSS on Refresh? Anne Spalding 6/24/13 4:35 PM
This is ridiculous.  I have the world's simplest website and the CSS is repeatedly broken on refresh in Chrome.  Have tried everything listed above to no avail.  Am writing additional styles to try to override the ones Chrome is mis-applying.  http://annespalding.com/CSCI106Online/SampleSite/Challenge2/homework.html


would really appreciate some help from Chrome here.  I am trying to teach a class to beginners and can't even get the sample site to behave properly so it's pretty hard to ask them to use Chrome.


Re: Chrome barfing on CSS on Refresh? Bibik 6/24/13 6:04 PM
There is an official bug report on this problem.
https://code.google.com/p/chromium/issues/detail?id=246875
I guess if more people "star" that issue it might move higher in bugs priority list.
Re: Chrome barfing on CSS on Refresh? Zeljko Stankovic 7/4/13 1:27 AM
For this topic there is a simple solution and explanation, its serversided the page with his CSS work normally on local computer but when uploaded to server the issue appear.

on your link: https://code.google.com/p/chromium/issues/detail?id=246875

I cannot replicate results.

Re: Chrome barfing on CSS on Refresh? Zeljko Stankovic 7/4/13 1:28 AM
try it on your local machine. DOwnload page and CSS if It works I know what is solution.
Re: Chrome barfing on CSS on Refresh? Bibik 7/4/13 6:57 AM
I face this issue regardless of the location of the web-page. When I develop in Visual Studio and run a page in debugger locally I have the same CSS problem as with the same page deployed to production IIS.
If you are talking about saving html+css as a file on local drive and opening it as a file in Chrome, then yes - css works fine, but this is kind of a known fact since the issue is somehow related to 304 response, but with local file system we do not get network response codes.
Re: Chrome barfing on CSS on Refresh? Zeljko Stankovic 7/5/13 1:24 AM
did you try to upload a css to dropbox public folder and then link it ?
Re: Chrome barfing on CSS on Refresh? Mitch Chapman 7/5/13 6:19 AM
I am still living with this issue but in case anyone was not aware - pressing shift+F5 triggers a refresh that will properly reload/reapply CSS.  Kind of a workaround for now.
Re: Chrome barfing on CSS on Refresh? Bibik 7/5/13 6:41 AM
>did you try to upload a css to dropbox public folder and then link it ?

I fail to see a value in this test.

Re: Chrome barfing on CSS on Refresh? Michael Hein 8/1/13 5:25 AM
Chrome responds strangely to 304 replies from the server hosting assets and fails to load the css file resulting in a garbage looking page output:

JQUERY has the answer. You can reload all css files and apply them, paste this into your pages gentlement to effectively guarantee chrome loads css each time you request a page:

function reloadStylesheets() {
    var queryString = '?reload=' + new Date().getTime();
    $('link[rel="stylesheet"]').each(function () {
        this.href = this.href.replace(/\?.*|$/, queryString);
    });
}


$.browser.chrome = /chrom(e|ium)/.test(navigator.userAgent.toLowerCase());

if($.browser.chrome){
reloadStylesheets() ;
}

Re: Chrome barfing on CSS on Refresh? Nikolaj Pedersen 8/5/13 4:14 AM
We are using Tornado web-server and had the issue with version 2.4.3.

Located it to a potential "Content-Length" set on 304 responses.
Tried to override this on 2.4.3, but could not (it was inserted again later
in the handling).

So we took the plunge and upgraded to 3.1 - all these issues went away.
Content-Length now was gone etc. No need for e-tag removal.

So for others having issues - this could very well be fixed by upgrading
your web-server software.
Or try removing the Content-Length from the response.

It seems Google updated Chrome to be more strict in some way, and some
might run into issues.

*Bottom line - Chrome will not be updated to fix this for you.*
*Update your web-servers.*

.nikolaj

Re: Chrome barfing on CSS on Refresh? Johny Woller Skovdal 8/5/13 5:49 AM
"*Bottom line - Chrome will not be updated to fix this for you.*" - This is a fact you have from where? That would be quite an issue if that's the case.
Re: Chrome barfing on CSS on Refresh? nitin.cool4urchat 8/11/13 3:46 PM
I also became a victim and my chrome version is " 28.0.1500.95 m"

Has it been solved ? Because it doesn't appear so ? I saw a few workarounds, I'll try them but hoping for a permanent fix from the project guys.

Re: Chrome barfing on CSS on Refresh? Richard Michie 8/28/13 7:59 AM
My Chrome is failing to load CSS on lots of sites, including Google+ and analytics. Hitting F5 seems to fix it, but that's not a proper way to work and it's really annoying. Any sight of a fix?

I'm running Windows 8 and the latest Chrome install with SEOMoz, Google Shortcuts and Hangouts extensions installed.

Re: Chrome barfing on CSS on Refresh? nitin.cool4urchat 8/29/13 6:47 AM
no update from the chrome guys :( still having this issue, chrome version has updated but no FIX !! Please star https://code.google.com/p/chromium/issues/detail?id=246875 so that they look into it asap.
Re: Chrome barfing on CSS on Refresh? Tim Wiitanen 8/31/13 6:01 AM
Already moved my corporate users over to $other_browser. Issue taking too long to resolve. Sad to see.
(unknown) 9/24/13 11:10 AM <This message has been deleted.>
(unknown) 9/24/13 11:13 AM <This message has been deleted.>
Re: Chrome barfing on CSS on Refresh? Glen Beltt 9/24/13 11:14 AM
Michael Hein's jQuery suggestion to address this bug is a great idea! Until it's fixed, jQuery may be the best solution for sites not using PHP or ASP since it limits the forced reloads to only stylesheets under Chrome. The function above was generating a JS error for me unfortunately so I modified it slightly to arrive at the following, which seems to work:

function reloadStylesheets() {
    var queryString = '?reload=' + new Date().getTime();
    $('link[rel="stylesheet"]').each(function () {
        this.href = this.href.replace(/\?.*|$/, queryString);
    });
}


if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())){
 reloadStylesheets() ;
}

Re: Chrome barfing on CSS on Refresh? Michal Yashpe 10/23/13 8:11 AM
I have a solution to this.
I set the body tag on the CSS to display:none, then when the page is loaded, on the end of the closing body tag, just set it back to visible like this: document.body.style.display = 'block';
(unknown) 11/8/13 5:43 AM <This message has been deleted.>
Re: Chrome barfing on CSS on Refresh? kdagli 11/8/13 5:46 AM
Anybody using a Spring and tomcat environment and having the same issue?
We found out that our 304 responses were not compliant with standards. The main issue was the handling of the static sources. Using ShallowEtagHeaderFilter for conditional processing of resources and using the interceptor below to stop caching on dynamic content helped us to solve the issue.

<bean id="responseCachingFilter" class="org.springframework.web.servlet.mvc.WebContentInterceptor">
          <property name="cacheSeconds" value="0" />
          <property name="useExpiresHeader" value="true" />
          <property name="useCacheControlHeader" value="true" />
          <property name="useCacheControlNoStore" value="true" />
          <property name="cacheMappings">
                        <props>
            <!-- don't set cache headers for the below urls -->
                    <prop key="/anyUrl/**">-1</prop>
                </props>
                  </property>
</bean>

Similar solutions should be available for different technologies and frameworks. You need to make sure that your response handlers are correctly handling the conditional requests.

You might consider serving your static resources with Apache or something similar instead of application server.

If you use a tool like Fiddler you will be able to see what is wrong with your responses.

More topics »