But on a dynamic site, when a request is made, and a response is sent, the response is sent to the '/', and NOT to the subfolder that's on the server side (at least by default). In the normal static sites that'd I'd create, I'd have to reference the subfolder that it was in (so in my case for example, I have the CSS stylesheet in my views folder, and I'd normally reference it like so: href='./views/styles.css'). The following was the first major thing that I learned doing this. I put this, where it belonged, in my header.html. The view one works fine, but the css doesn't: Then in my renderer module, I added a function to add css, which looks similar to my view function that was called in the home function above. The video made it seem like that's all that needed to be done in order to load css properly. ![]() My thought process here was that I could just change the Content-Type to text/css, and then everything could load perfectly fine. I defined two headers, one for text/html, and the other for text/css var commonHeaders =
0 Comments
Leave a Reply. |