I'm facing an issue with IE, and found many subjects but none of them solved my problems.
If I set the setting of IE to be "Check for newer versions of stored pages: Every time I visit the webpage" it will working, but I need the same thing on client browser.
how can I force IE to reload the new version of page every time user loggin by javascript or jquery code?
I'm facing an issue with IE, and found many subjects but none of them solved my problems.
If I set the setting of IE to be "Check for newer versions of stored pages: Every time I visit the webpage" it will working, but I need the same thing on client browser.
how can I force IE to reload the new version of page every time user loggin by javascript or jquery code?
You can do this with JavaScript/jQuery by selecting all the anchor tags on the page and appending the current date time to the URL. But this only works from generated on your site. It does not work if users bookmarked URLs.
Thanks for your reply, I want to know how can I do it if I'm facing below case:
I have a XView.cshtml, inside this view I'm calling a method name "GetDocuments" that will call an ajax, the method exist in "MyScript.js" file... in the chrome, no issue every time ajax will call the codeBehind and get the documents... but in IE it will
call the ajax only one time, after that even will not call it.
<script type="text/javascript" src="~/scripts/MyScript.js"></script>
<script>
//This is in XView.cshtml
// Example id = 5;
LoadDocuments(id)
</script>
// MyScript.js
function LoadDocuments(x){
$.ajax({
url: 'MyApplication/GetDocuments',
type: 'GET',
data: {
'appId': x
},
async: false,
success: function (partialView) {
$('#divId').html(partialView);
},
error: function (erorr) {
console.log(erorr);
}
});
}
I put breakpoint in codebehind,, in the chrome, each time you will call method, browser see the codebehind and will get partial view and render it.
But in IE, only one time, after that I see the compiler in javascript run the method and the ajax, but not see codebehind [Breakpoint not run] which means browser not see the new data.
Member
49 Points
121 Posts
IE cache issue not relead the page
Jun 04, 2020 02:08 PM|Khalid Salameh|LINK
Hello,
I'm facing an issue with IE, and found many subjects but none of them solved my problems.
If I set the setting of IE to be "Check for newer versions of stored pages: Every time I visit the webpage" it will working, but I need the same thing on client browser.
how can I force IE to reload the new version of page every time user loggin by javascript or jquery code?
All-Star
53121 Points
23673 Posts
Re: IE cache issue not relead the page
Jun 04, 2020 02:50 PM|mgebhard|LINK
You can do this with JavaScript/jQuery by selecting all the anchor tags on the page and appending the current date time to the URL. But this only works from generated on your site. It does not work if users bookmarked URLs.
Member
49 Points
121 Posts
Re: IE cache issue not relead the page
Jun 05, 2020 12:19 AM|Khalid Salameh|LINK
Dear mgebhard,
Thanks for your reply, I want to know how can I do it if I'm facing below case:
I have a XView.cshtml, inside this view I'm calling a method name "GetDocuments" that will call an ajax, the method exist in "MyScript.js" file... in the chrome, no issue every time ajax will call the codeBehind and get the documents... but in IE it will call the ajax only one time, after that even will not call it.
I put breakpoint in codebehind,, in the chrome, each time you will call method, browser see the codebehind and will get partial view and render it.
But in IE, only one time, after that I see the compiler in javascript run the method and the ajax, but not see codebehind [Breakpoint not run] which means browser not see the new data.
Please help.. best regards.
All-Star
53121 Points
23673 Posts
Re: IE cache issue not relead the page
Jun 05, 2020 12:44 AM|mgebhard|LINK
Set the AJAX cache property to false .
AJAX documentation documentation.
https://api.jquery.com/jquery.ajax/
Member
49 Points
121 Posts
Re: IE cache issue not relead the page
Jun 05, 2020 06:25 AM|Khalid Salameh|LINK
Dear mgebhard,
BEST Regards... and thanks a lot ,, it is working fine.