Kubis10
Kubis10

Reputation: 13

Attaching css stylesheet

I have a very strange problem that never happen to me. I normally attach css as always and in Visual Studio code or in local file is working perfect. <link href="css/style.css" rel="stylesheet"> But when I host page all css is gone(I try 4 of them). Then I must reload all linked stylesheet to be working again(special extension in chrome). Someone have any idea why this happen?

Upvotes: 0

Views: 98

Answers (2)

Unbywyd
Unbywyd

Reputation: 966

Useful information: To avoid the problem of caching styles and scripts, it is recommended to use version

<link rel="stylesheet" href="/mydomain.com/css/style?v=1598035492054">

I recommend that you read this article

Upvotes: 0

fviccia
fviccia

Reputation: 21

Edit: As the user suggest, also first try to clear the browser cache, deleting cookies and data, before continuing troubleshooting.

The most common problem causing that issue is the location of the .css file, it depends on how you are hosting the site but perhaps setting an absolute path to the file can help you discard the location issue. Also you are telling something about a chrome extension, did you try loading the page in another browser for troubleshooting?

Upvotes: 2

Related Questions