I am calling a JS function inside the html's body section, the function's parameters are gathered by parsing the EL inside the function.
Eg:
<script type="text/javascript">
jQuery(window).load(function() {
loadImage("${expression_language_var_1}", "${expression_language_var2}");
});
</script>
But it seems that sometimes both parameters are cached and I do receive old information.
Best Regards,
The issue is that the entire HTML page is being cached, including the script tags which contain your evaluated EL. If you serve the page with the following header tags the browser shouldn't cache it:
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
For more details about how these headers disable caching refer to this answer: Using <meta> tags to turn off caching in all browsers?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With