Questions tagged [static-content]

Static content generally refers to additional files or media that is delivered to browsers but not generated through the web application. Examples include images, script files, and stylesheets.

242 questions
261
votes
2 answers

Event handler not working on dynamic content

I have a tag A in which when clicked on, it appends another tag B to perform an action B on click. So when I click on tag B, action B is performed. However, the .on method does not seems to be working on the dynamically created tag B. My html and…
kkh
  • 4,699
  • 12
  • 42
  • 68
212
votes
8 answers

Best lightweight web server (only static content) for Windows

I got application server running in Windows – IIS6.0 with Zend Server to execute PHP. I am looking for lightweight static content only web server on this same machine which will relive IIS form handling static content and increase performance. It…
bensiu
  • 20,820
  • 48
  • 65
  • 104
134
votes
10 answers

Simplest way to serve static data from outside the application server in a Java web application

I have a Java web application running on Tomcat. I want to load static images that will be shown both on the Web UI and in PDF files generated by the application. Also new images will be added and saved by uploading via the Web UI. It's not a…
Janne
  • 3,447
  • 5
  • 25
  • 34
73
votes
8 answers

How to do static content in Rails?

Looking at different options: One is to just put the static pages in the public/ folder, but I do want the header from layout/application to be consistent. I tried this, but I got an error: # in routes.rb: map.connect '*path', :controller =>…
Satchel
  • 15,436
  • 22
  • 100
  • 180
72
votes
12 answers

How do I use Spring Boot to serve static content located in Dropbox folder?

I have a Spring Boot web application, and I would like to serve static content located in a shared Dropbox directory on my Linode VPS (~/Dropbox/images). I've read that Spring Boot will automatically serve static content…
40
votes
2 answers

How to configure Wildfly to serve static content (like images)?

I have a JavaEE application running on Wildfly 8.0.0 Final. The application uses a lot of images and I don't want to store them in the database, so they are written to the hard disk. How can I configure Wildfly/Undertow in order to serve these files…
Christian Götz
  • 788
  • 1
  • 7
  • 11
35
votes
3 answers

Azure Website slow to serve static JS/CSS but not binary

I have an Azure Website/Web App that is incredibly slow to serve static JS and CSS files but seems perfectly fine serving binary. To test the problem I uploaded two 30MB files, one big.js and the other big.rar. The JS file downloads at around…
Matt Jenkins
  • 2,507
  • 1
  • 24
  • 32
28
votes
8 answers

Spring Boot project with static content generates 404 when running jar

The recent blog post (https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot) by Spring regarding the use of static web content in Spring Boot projects indicates that several resource directories may be…
Robert Hunt
  • 6,348
  • 3
  • 34
  • 42
28
votes
3 answers

Azure, best way to store and deploy static content (e.g. images/css)?

We're about to deploy our .NET web application to an Azure Web Role. I'm just wondering how others have handled their static content, specifically images and css? At the moment our application package is about 25mb but 18mb of that is derived purely…
QFDev
  • 7,618
  • 13
  • 52
  • 81
22
votes
1 answer

Serving gzipped content directly — bad thing to do?

I have my website configured to serve static content using gzip compression, like so: I don't see any website doing anything similar. So,…
its_me
  • 10,289
  • 23
  • 78
  • 126
20
votes
5 answers

How to serve static content using Webflux?

I am learning webflux and I would like to know how to serve static content on a MicroService using webflux but I didn´t find information to do it.
jabrena
  • 736
  • 2
  • 6
  • 20
19
votes
2 answers

Cache a static file in memory forever on Nginx?

I have Nginx running in a Docker container, and it serves some static files. The files will never change at runtime - if they actually do change, the container will be stopped, the image will be rebuilt, and a new container will be started. So, to…
Golo Roden
  • 112,924
  • 78
  • 260
  • 376
18
votes
4 answers

How to do Forms Authentication on purely HTML pages using ASP.NET?

I am using forms authentication in IIS7 to password-protect a dev site, but the authentication seems to get by-passed when the site contains only static HTML files + login.aspx + web.config. When I renamed the files to .aspx, I am prompted with the…
Abe
  • 5,806
  • 11
  • 44
  • 74
17
votes
2 answers

How to expose and serve WOFF file from Azure without web.config?

I'm serving a static site (really Angular but all the bundles are static as well as the index-html) in Azure. It works as supposed to except a single thing. For some reason the WOFF files aren't being exposed properly. The solution for it as far my…
Konrad Viltersten
  • 28,018
  • 52
  • 196
  • 347
16
votes
6 answers

IIS 8.5 is not serving JS, CSS, and Image files (static content)

The problem We're running IIS on Windows 8.1 with Update. We're at the Orchard CMS first time setup screen, and IIS is giving 401s for all static content. We have read the following to no avail: IIS 7.5 no images css js showing IIS 7.5 no images…
Shaun Luttin
  • 107,550
  • 65
  • 332
  • 414
1
2 3
16 17