This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes Performance and the fly likes Performance Issue in cache at client side. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Performance
Reply 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: 6588
    
    1

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 - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
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: 4724
    
    7

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?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: Performance Issue in cache at client side.
 
Similar Threads
Content from Spec
Javascript Modifications are not affected in eclipse editor
Access Response Status From Filter
mouse hover on multiselect dropdown
SyntaxHighlighter for Java Code