Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

External CSS file not being accessed from HTML on website in bucket

I have a website, purplechurch.com, whose html pages access external CSS files.  All files appear in a bucket but the CSS files are down a couple of folders in the directory.  All files are publicly accessible and can be viewed with the browser, using the same href URL.  Normally I might set the execute permissions...

While it means very little, it all worked on a Linux host before moving to a bucket.

www.purplechurch.com/index2.html

css example: http://www.purplechurch.com/global/cssstyle/sitetext.css

This seems like a silly little problem but it has me stumped.  Any help is appreciated, and if this is the wrong place to ask, please point me in the right direction.

Solved Solved
0 3 2,053
1 ACCEPTED SOLUTION

You were correct.  I edited the metadata to set the content-type to text/css.  The index.html file is being served from the same bucket.  Unfortunately I think I have problems with the app.yaml script and will need to edit it as well.  Not solved but not part of this thread, will mark as accept as solution.

View solution in original post

3 REPLIES 3

Perhaps I need to surround the CSS in each file with <style></style>?  Or perhaps the .css extension needs to be .html because the cloud only serves html?  I tried both and it does not work.  See purplechurch.com/index2.html

Hi, Sandsmuseum,

What is the “apparent” content-type of your CSS files in your Cloud Storage? See, it should be text/css.

Is the index.html file served on a Google app engine url? It should be served from the same bucket, see.

I will be waiting for your response.

You were correct.  I edited the metadata to set the content-type to text/css.  The index.html file is being served from the same bucket.  Unfortunately I think I have problems with the app.yaml script and will need to edit it as well.  Not solved but not part of this thread, will mark as accept as solution.