Changing Content-Type header for JavaScript and CSS files

As I blogged about some time back I was having some problems when running in XHTML Strict mode since Domino sent my stylesheet as text/html and not text/css. The solution was to rename the content field and the Content-Type for the document.

Another way to solve the same issue is to use a Web Site rule and replace the Content-Type header for specific URL patterns. You need to be running Internet Sites for this to work.

I now use this solution successfully for both JavaScript and CSS-files.

Published by

lekkim

Positive, competent, out-spoken, frank and customer focused architect and developer with a strong foundation in web, cloud and product development. I'm a strong advocate for API first and cloud based solutions and development. I have a knack for being able to communicate and present technically complicated matters in conference, customer and training settings. I've previously acted as team member and leader in a product organisation.