Search code examples
c#phpjqueryasp.net-mvc-3fiddler

Fiddler Qustion & why a php/aspx page for style sheet,


I do not need any help w/ code, it is pretty straight forward, just need an explanation w/Fiddler & the why name a css file with php/aspx extension. I am trying to replicate an action from a website. Basically it involves a button one clicks to change the site's theme.

When clicked, a command fires off to a php page (no problem, can replicate the same thing with an MVC ActionMethod call). However, when I look in Fiddler's raw view, I see all the related style properties. There are no opening/closing style tags and they are not embedded in the web page, rather jquery append is made to the html head tag pointing to the new style sheet that contains the style properties I observed in Fiddler.

So here are my 2 questions:

1. While I understand why the button link points to a php/aspx page in order to call the medthod, but why does the resulting stylesheet page as embeded in the Html end with php/aspx extension? Why not just a plain .css?

2. What action would cause Fiddler to show the style sheet lines in raw view and how would I replicate that in a C# method call? I mean, if all I am doing is creating a new stylesheet page (again ending in a php/aspx extension), and appending the current html to point to tyhat new style sheet file, if anything wouldn't the result view be the html and not the new style sheet lines?

Here is an example of what I observed in Fiddler's raw view:

.new-web-site-theme-12345 a img { border: 0; }

.new-web-site-theme-12345 #content div.paragraph { color: #676767; }

.new-web-site-theme-12345 #logo { padding: 25px 0; }

.new-web-site-theme-12345 .mySite-search { margin: 0 0 0 10px; }

Thanks


Solution

  • For 1.: Why not? You can name whatever you love/like, there is no need to name a stylesheet with .css at the end, that is only a convention. Browser use mime-types not file-extensions, this is not your harddisk.

    For 2.: I can't answer you that. You have not really outlined how the outcome looks like, so in lack of specifics, no answer can be given without guessing around which I don't like much. So I prefer a huh? instead.