aspose file tools*
The moose likes Performance and the fly likes Performance Issue in cache at client side. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Performance Issue in cache at client side." Watch "Performance Issue in cache at client side." New topic
Author

Performance Issue in cache at client side.

Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 63

Hi,
I am trying to enable cache of js|css|images| or static file at client side. I have tried web utility in my web application and i also tried, changing httpd.conf file for enabling cache.
Although its working fine. But the biggest problem i found, if somehow i have to change to static file e.g js.
then how would i update the client side cache that this content is changed, download new copy of this js and the rest of the contents(other css and js) will not affect by doing this ?

we have two http server, IBM http server, apache http server.

Any help thanks in andvance.


Correct Me if i am wrong
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

You can set reasonable cache invalid intervals using HTTP headers. That way the resource is updated periodically. Or you can fool the browser / proxy by requesting the resource with a unique parameter like so /pic.jpg?id=1428339. A new software release can contain a new ID to trick the browser into thinking it is a new resource. The last modified date and etags are other approaches to controlling client side cache.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 63

Thanks Deepak,
Actually I am not getting how to enable the ETag in Http server?
Can you please elaborate of implementation the Etag or suggest me good links to enabling etags on Http server like apache and IBM server.

Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8196
    
  23

Neeraj Dhiman wrote:Actually I am not getting how to enable the ETag in Http server?

Dunno, but is this something that might benefit from a caching proxy (like squid)?

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Performance Issue in cache at client side.