• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Problem with browser caching

 
Ranch Hand
Posts: 284
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'am working on a pagination problem. I am posting data from my Action class to the display JSP and when user press Next link again flow goes to Action class then to same JSP again with new data.

i have used the rownum query in action and it keeps changing the lower_bound and upper_bound with every call to execute() in my action as below-:


with each call from my jsp with Next link .

All is working fine but am getting the rows appended with previous rows in my JSP. That is for first request am getting 15 rows. Again a click on Next is giving me 30 rows with 15 new rows appended to previous 15. I tried to clear browser cache as below but it doesn't seem to work-:


My URL is not same for every query as my page parameter value is getting changed every time still its not working as expected.

I had put a output statement on Action class, just to be sure am getting result in incremental sets. It seems fine from below result of two consecutive calls-:



Please inform i did not make my point clear. i tried this in Mozilla, IE , both gives same result.

Anyone having any idea how to get around this...
 
Pranav Bhatt
Ranch Hand
Posts: 284
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks i have solved it.. Its working now..
 
Sheriff
Posts: 9708
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its good to know that its working. Well these are the response headers that I use to prevent caching

 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All other cache-control fields are pointless when no-cache is specified.
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My question probably depends on the client but, what effect do these no cache headers have on images referenced in the HTML? It should be none right? I am thinking that the no cache header only applies to the HTML and not the objects that the HTML tells the browser to request.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Images are obtained by fully separate and independent requests fired by the webbrowser itself after examing the 'src' attribute.
 
Mark Williams
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bauke Scholtz wrote:Images are obtained by fully separate and independent requests fired by the webbrowser itself after examing the 'src' attribute.



So, I will assume that the headers are not stopping the browser from caching images on the page. Thanks.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Indeed. The response headers only applies on the current request/response and certainly not on others.
 
Yeah, but is it art? What do you think tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic