Topic: using <link> tags for including a .css file (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: sj, ca, usa |
posted 02-27-2002 18:13
I have a question: when refrencing a stylesheet externally, is it ok to reference any file type, so long as the content is the same? for instance, if i renamed my external css file from style.css to style.file, are there any issues with saying something like: |
Bipolar (III) Inmate From: Berlin (almost) |
posted 02-27-2002 18:56
Yes, you can change the extension to whatever you wish... but, why don't you want to use .css ? |
Bipolar (III) Inmate From: USA! USA! USA! |
posted 02-27-2002 19:00
You should also be able to reference a script/dynamic page in the href. The server should run the code and return it's content in the context of the LINK element. Just in case you need to differentiate between browsers, etc. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 02-27-2002 19:28
Are you sure about that? I think if you specify that it's going to be a text/css file, then that's what it's going to look for... |
Nervous Wreck (II) Inmate From: sj, ca, usa |
posted 02-27-2002 19:29
well, what i was trying to do was simple (supposed to be, at least): i just needed to change the color of the text for my copyright class tag from CCCCCC to black. but my code is running on an apache server that is also running tomcat and java, so the server is serving up html content from one place and jsp content from another, and so the server was trying to load the css file, but it was cached not only by IE but also by apache, and i couldn't get it to load the updated file. so i changed it to style.jsp, and that fixed the problem, since jsp is always being checked for latest versions and not cached versions. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 02-27-2002 19:34
Makes sense. Should work fine. But change it back for readability in the future when the old caches are deleted (if they are). |
Nervous Wreck (II) Inmate From: sj, ca, usa |
posted 02-27-2002 19:43
cool, thanks for the input and advice! |
Bipolar (III) Inmate From: USA! USA! USA! |
posted 02-27-2002 23:48
The use of JSP is exactly what I mean. The server doesn't care what text it's throwing back to the client. It's the browser that decides the context is text/css. One can do the same with an included JavaScript file, CSS, images, etc. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 02-28-2002 02:08
Ooooh, I gotcha. I thought you meant client-side script when you said script. |