since I’m trying to solve this problem for some days, I thought about giving you guys a chance. The situation:
We’re running a SAP Shop with Java Server Pages and Struts in background. We had to disable the HTML Header setable Cache with:
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Expires", "0");
Now what I want to do seemed to us as a simple task but turned out to be more scientific than we expected.
We want to turn auto-complete for IE back on just for the login page. What I and my colleague tried were simple approaches like resetting the header values to various “should be caching” values like ‘public’ with expirens tomorrow or sth. Neither did anything give us that auto-complete boxes in IE6 and up.
So does anyone know a method for JUST ONE PAGE in a Struts system to turn the caching & as we think the autocomplete back on?
Okay by now I found the answer myself. It seems easier when you talk about it, does it?
So the problem was, that we used a javascript function to submit our login form site. But that’s not how you should do it (say’s microsoft). I heard a techcast some minutes ago about the internet explorer relying on suspicious buttons for implemented browser functionality.
Having heard that the answer was kind of clear in my head. I head to submit over a button. Since we (HAVE TO!) use Javascript to submit, cause the button is only a styled div, I had to call a button click to show IE that we do a ‘official’ postback.
That’s the code:
It now works fine.