Blazor css file not updating when app is launched
If you are not seeing changes that you have applied to the app.css file, you may need to clear your browser cache, manually.
A better solution is to use versioning as shown below:
<link rel="stylesheet" type="text/css" href="css/app.css?version=0.1">
Add a version number as a query parameter. This will force the browser to look for the latest version of the style sheet ...
Why my css file is not loading when deployed in heroku? P.S: I'm using ejs
After rigorous research and trying so many ways finally I'm able to resolve my issue by myself.
I have done some major changes, and my issue was resolved.
I have changed my file structure a little bit.
From this to this
I have created a new directory called partials in the views directory and moved my header.ejs and footer.ejs files to that directory.
In header.ejs file I have changed the code from this
<link href="css/styles.css" rel="stylesheet" type="text/css" >
to
<link href="/css/styles.css" rel="stylesheet" type="text/css" >
In other .ejs files I have included the header.ejs and footer.ejs as follows:
<%- include("partials/header"); -%>
<%- include("partials/footer"); -%>
And that's how I am able to solve my issue.
Hakuna Matata
CSS not loading with node.js and express
Change app.get('/', (request, responseC) => {
to app.get('/style.css', (request, responseC) => {
Related Topics
Get Chromes Console Log via Ruby Webdriver
Convert a String of 0-F into a Byte Array in Ruby
How to Count Existing Instances of a Class in Ruby
Travis Ci: Fatal: Role Does Not Exist
How to Do String Comparison in Ruby
Ruby on Rails - Doesn't Create Script/Server
Calendar Events Notification Not Received on Server
How to Decode a Cookie from the Header of a Websocket Connection Handshake? (Ruby)
Ruby on Rails: Confirmation Page for Activerecord Object Creation
Ruby on Rails Multiple Http Request at the Same Time
Ruby: How to Find the Key of the Largest Value in a Hash
Declaring an Integer Range with Step != 1 in Ruby
Which Equality Test Does Ruby's Hash Use When Comparing Keys