0

Please help to set the Expiry Header for files like JS/Images/CSS

Server : Linux App Server : Jboss

I was getting some examples in internet to achieve similar thing using .htaccess files, but it not clear.

raghu veer
  • 1
  • 1
  • 4

1 Answers1

1

You can do that within an application by using a custom filter, like this.

But you did not explain the actual problem you are trying to solve. Your question sounds pretty unusual, so chances are high that what you really need is something completely different. You mention .htaccess file, and this means you have a web server, likely Apache, along with JBoss. Static contents (files like .css, .js, etc.) should normally be served by that server, not JBoss. Then, it's not JBoss that should set HTTP headers for them. Here you can find an explanation how it should be done in Apache.

Community
  • 1
  • 1
Alex Nevidomsky
  • 668
  • 7
  • 14