Static-files are ones that don't get amended during runtime. This could be a HTML file that's served up by a web server.
Questions tagged [static-files]
769 questions
10
votes
3 answers
How can Tornado serve a single static file at an arbitrary location?
I am developing a simple web app with Tornado. It serves some dynamic files and some static ones. The dynamic ones are not a problem, but I am having trouble serving a static file. What I am looking to do is to serve the file /path/to/foo.json when…

Randall Cook
- 6,728
- 6
- 33
- 68
10
votes
5 answers
Django project with gunicorn server on Heroku does not serve static files
My Django 1.3 project serves the static files on a development server but with the gunicorn server static files are not served. I followed the steps of this Heroku guide.
When I used the contents of my procfile like in the guide (
web: gunicorn…

Bentley4
- 10,678
- 25
- 83
- 134
9
votes
0 answers
Serving static files from Nginx proxy for ASP.NET Core SPA apps
As many know, it is recommended to use a proxy server for web apps served by an application server.
Also, it is recommended to use the proxy to serve static files.
For "normal" .NET Core apps the setup is simple. For example:
location /css/ { …

JustAMartin
- 13,165
- 18
- 99
- 183
9
votes
1 answer
nodeJs/Express dealing with missing static files
I have a node App. That is configured to serve static files by:
app.use(express.static(path.join(__dirname, '../public')));
And I use some auth middlewares on other routes. The problem comes up when I hit an image that doesn't exist on the…

Max
- 211
- 3
- 7
9
votes
0 answers
In Sinatra, how can I serve static index.html files in subdirectories in public folder?
Possible Duplicate:
Serving static files with Sinatra
I noticed that Sinatra does not recognize index.html files in public folder's subdirectories and returns an error when url is pointing to a directory without specifiying the file name.
For…

socrateos
- 91
- 1
- 2
9
votes
3 answers
Microsoft.Owin.StaticFiles works in console host but I get a 404 in IIS on file requests
I have Microsoft.Owin.FileServer (v2.1.0) set up in my Owin pipeline, and setting up FileServerOptions with EnableDirectoryBrowsing = true works great for showing the directory contents in both my console host and iisexpress.
It's when I try to view…

Trey Mack
- 4,215
- 2
- 25
- 31
8
votes
2 answers
Rails 3.1, Unicorn and Apache: static files
I have Rails 3.1, Unicorn and Apache setup. My Apache settings are below and production.rb looks like this. I like using h264 streaming but since Rails is serving these video files, the Apache Mod won't work.
DocumentRoot…

jiriki
- 83
- 2
- 4
8
votes
3 answers
ReactJS: How to prevent browser from caching static files?
I'm working on my project using ReactJS and I use create-react-app to create my app. After building project, I use my server to serve the build folder. And when I update my app, the browser of user still uses the old version of my app because it…

Phuong
- 93
- 1
- 1
- 5
8
votes
5 answers
How to handle javascript & css files across a site?
I have had some thoughts recently on how to handle shared javascript and css files across a web application.
In a current web application that I am working on, I got quite a large number of different javascripts and css files that are placed in an…

Industrial
- 41,400
- 69
- 194
- 289
8
votes
1 answer
Authorization for Static Files in ASP.NET MVC w/ Owin
I have the need to secure an entire folder of static HTML files. The intention is that a user cannot access these files unless they are authenticated and have the necessary role.
We've got cookie-based authentication set up using OWIN, but no matter…

Anthony Compton
- 5,271
- 3
- 29
- 38
8
votes
3 answers
python built in server not loading css
when i runserver the django admin is missing css.The web console says that style sheet was not loaded because its MIME type,"application/x-css", is not "text/css".
This is my settings.py file
Django settings for mysite project.
DEBUG =…

ciira
- 103
- 1
- 6
8
votes
0 answers
node-static vs express.static
I am trying to set up a static file server/cache in Node.js. I use Express.js.
Express comes in with a built-in static server, and Express is definitely one of the most used frameworks, and so one would expect the static middleware to be super…

dthree
- 19,847
- 14
- 77
- 106
7
votes
2 answers
Locations of templates and static files in Django
I am planning a new Django project and want to get everything right and stuff. I stumbled over the question of how to organize the project directory layout. Luckily, there are quite a few examples of good project templates out there in the web.…

j0ker
- 4,069
- 4
- 43
- 65
7
votes
2 answers
Serve files from folder outside web application in Jetty
I have a Java web application (Eclipse/OSGI) on a Jetty server. I want to be able to serve static files to my web application from a folder outside of the web root. In my web application, I don't yet know the file name of the file I want to be…

Farna
- 181
- 1
- 1
- 5
7
votes
3 answers
Check for a static file during Application_BeginRequest?
I have a Global.asx file that needs to do custom authentication, auditing and profiling stuff. This is needed because it supports a SAML based SSO system and needs to override the normal .Net authentication (which doesn't support either SAML or…

Keith
- 150,284
- 78
- 298
- 434