Currently, I am facing an issue with my AJAX implementation along with executing some JavaScript/jQuery code. The problem is specific to IE7 as it keeps reloading the content repeatedly without stopping, while other browsers work fine.
I have tried a couple of solutions like:
$.ajaxSetup({
cache: false
});
and adding these meta tags:
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
Unfortunately, none of these methods seem to resolve the issue in IE7.
Struggling to find a suitable solution and seeking assistance from the community. Any help would be greatly appreciated. Thank you.
This is the AJAX code snippet causing the problem:
$('#ir_content').load(pageurl + ' #ir_inner_content');
In addition, another file that used manually written JavaScript with backend language was being run through onload event on an image tag:
<img src="/images/icon_loadingLarge.gif" width="32" height="32" alt="loading..." id="loading_indicator" style="display: none;" onload="var script_text = $('#webchart_js').html(); eval(script_text);" />
The script_text content is as follows:
<div id="webchart_js">
(function($){
var interactive_chart_config = {
zoom_historical_default: [% chart_config.chart.chart_interactive.zoom_historical_default %],
zoom_intraday_default: [% chart_config.chart.chart_interactive.zoom_intraday_default %],
quotes_delay: [% ir.var.Config.format.quotes_delay %],
news_on_chart: {
[% news_types = chart_config.chart.chart_interactive.news_on_chart.keys %]
[% FOREACH news_type = news_types %]
[% news_type %]: {
[% news_options = chart_config.chart.chart_interactive.news_on_chart.${news_type}.keys %]
[% FOREACH news_option = news_options %]
[% news_option %]: [% chart_config.chart.chart_interactive.news_on_chart.${news_type}.${news_option} ? 'true' : 'false' %][% IF news_option != news_options.last %],[% END %]
[% END %]
}[% IF news_type != news_types.last %],[% END %]
[% END %]
},
modify_news: [
[% FOREACH news = chart_config.chart.chart_interactive.modify_news.news %]
{
[% FOREACH key = news.keys %]
[% key %]: '[% news.${key} %]'[% IF key != news.keys.last %],[% END %]
[% END %]
}[% IF news != chart_config.chart.chart_interactive.modify_news.news.last %],[% END %]
[% END %]
]
};
$(document).ready(function(){
$('#content_container').web_chart($.extend({}, {
theme : Highcharts.theme,
counter_code : "[%= stock_ids.first %]",
plot_on_load : true,
always_reload : true,
loading_indicator_id : 'loading_indicator',
chart_setting_id : 'chart_setting',
counter_list_form_id : 'counter_list_form',
chart_container_id : 'chart_container',
css_class_for_flags : {'N' : 'news_tooltip', 'I' : 'insider_trades_tooltip', 'C' : 'corporate_actions_tooltip'}
}, interactive_chart_config));
});
})(jQuery);
</div>