Is the .CSS File Accessible from the Web

P

PeterOut

I hope this is not a stupid question but I was wondering if the CSS
file used for a web page can be accessed from the web. I understand
that the html file can be from most servers by using, for example,
View:page Source on Firefox. But what about the CSS file?

Many thanks in advance,
Peter.
 
J

Jukka K. Korpela

PeterOut said:
I hope this is not a stupid question but I was wondering if the CSS
file used for a web page can be accessed from the web. I understand
that the html file can be from most servers by using, for example,
View:page Source on Firefox. But what about the CSS file?

If browsers can access the CSS file, how do you expect to prevent people
from looking at it, and why do you care?
 
N

Neredbojias

I hope this is not a stupid question but I was wondering if the CSS
file used for a web page can be accessed from the web. I understand
that the html file can be from most servers by using, for example,
View:page Source on Firefox. But what about the CSS file?

Many thanks in advance,
Peter.

Did you try entering the url of one in the address bar of your browser,
hitting enter, and seeing what happens?
 
R

richard

I hope this is not a stupid question but I was wondering if the CSS
file used for a web page can be accessed from the web. I understand
that the html file can be from most servers by using, for example,
View:page Source on Firefox. But what about the CSS file?

Many thanks in advance,
Peter.

Naturally. It's just a standard text file so any browser can read it.
All I need to do is look at your code and see where you put it.
Most probably put it in the folder as the html file.
So you might have, example.com/folder/index.html then for the css would be
example.com/folder/filename.css
 
J

Jeremy J Starcher

I hope this is not a stupid question but I was wondering if the CSS file
used for a web page can be accessed from the web. I understand that the
html file can be from most servers by using, for example, View:page
Source on Firefox. But what about the CSS file?

Many thanks in advance,
Peter.

The associated CSS files can be seen several different ways.
You can try viewing the document source and looking for where the style
sheet is referenced.

You can try saving the document locally (save complete document). This
/usually/ saves the CSS file as well. [1]

There is a Firefox extension that will show CSS and JS files on your
status bar, allowing you to click and easily view them.

wget, using the '-p' parameter, will include style sheets.

[1] Firefox, in particular, has a problem if a style sheet was loaded via
the @import fule. There is even an extension to 'save page complete' to
fix the borked one built in.
 
P

PeterOut

If browsers can access the CSS file, how do you expect to prevent people
from looking at it, and why do you care?

Thank you to everyone for the replies. I meant if I had a CSS file on
the hard drive of my computer that I am using as a server, could
someone read it through the browser? From the replies, it would
appear that the answer is yes. I'm new to web applications.

Thanks,
Peter.
 
D

DLU

PeterOut said:
I hope this is not a stupid question but I was wondering if the CSS
file used for a web page can be accessed from the web. I understand
that the html file can be from most servers by using, for example,
View:page Source on Firefox. But what about the CSS file?

Many thanks in advance,
Peter.
Use firebug with Firefox.

--
***************************************
* This is the Spammish Inquisition *
* Not Lumber Cartel Unit 75 [TINLC] *
* I am not SPEWS.ORG *
***************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top