Karlfromtheisland
Karlfromtheisland

Reputation: 57

Website not loading CSS after refresh in Chrome

So there is this site-> http://www.raudsilla.ee

This problem occurs only in Chrome- whenever you press refresh the page loses its CSS. Weird thing is that if you look the code of both- after and before refresh, they look exactly the same. And again, only happens in chrome.

I have tried quite may things, so far no luck... I wouldn't like to rule out anything at the moment, so any help appreciated.

Upvotes: 4

Views: 46484

Answers (7)

Naresh Bisht
Naresh Bisht

Reputation: 719

Open the console(ctrl + shift + c) and then network panel and check the disable cache button.

enter image description here

Upvotes: 0

Hamza Kouadri
Hamza Kouadri

Reputation: 141

desable addblock and refresh, if the website loaded correctly check the plugin

Upvotes: 0

dmcquay
dmcquay

Reputation: 167

site.css was not loading in Chrome. I added the ? in the CSS url and my styles started appearing.

Upvotes: 2

Fernando Oliveira
Fernando Oliveira

Reputation: 21

After some crazy tests, I found the solution by adding "?" to the url css file.

Example: href="../_css/setup_system.css?" type="text/css"

Upvotes: 2

Allard
Allard

Reputation: 21

I am seeing the same behavior on one of our own sites and started looking for a cause. The only conclusion I could come up with for now is that it is caused by the Mime Type of your stylesheet. This conclusion is supported by the behavior on our side.

Update: There are three ways in which Chrome seems to load the CSS file:

  • As a fresh request, no cached version available, our server returns HTTP 200 OK, with content-type text/css. This works fine.
  • From the cache, without consulting the server. Chrome has cached content-type text/css. This works fine.
  • As a request with a cached version available. Our server returns HTTP 304 Not Modified, with content-type text/plain. This does not work.

Upvotes: 2

Larry
Larry

Reputation: 1239

Shift + Refresh solves the problem so it must be a cache problem. PS . The site takes quite a long time to load, considered optimising?

Upvotes: 1

Danimt
Danimt

Reputation: 1067

The browser is outputting javascript errors, if you check the code, you're calling jQuery's document ready before the script is loaded, as it says, "$ is not defined".

After fixing the existing javascript error, it should load correctly.

Upvotes: 5

Related Questions