0

I'm converting a style-sheet from .CSS to .ASPX, so I can load some color configurations from a database, in to my style-sheet.

Inside the aspx style-sheet would be a DB connection, a small SQL query to grab the colors, and then the rest of my css, sometimes containing ASP variables.

Will this styles.aspx page still get cached in the same way as a normal css file would?

2 Answers 2

2

As long as the URL isn't constantly changing due to a querystring it will be cached just like a normal stylesheet. Browsers only see the response headers sent by the server and the content of the stylesheet, not the source code on the server.

Sign up to request clarification or add additional context in comments.

Comments

1

The client does not care at all what happens server side. The only thing it cares about is the response and the response HTTP headers. If those are identical to a regular CSS file, it doesn't make any difference whether the response is served from a file, created dynamically via ASP or written on the fly by unicorns.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.