Arifur Rahman
Arifur Rahman

Reputation: 21

How to do Control F5 with Javascript with location.reload method

I submit delete a list data with ajax . Further I want to refresh the page . But it popped a screen like page refresh. when I call location.reload(); method like F5 functionality. But I want to simulate a CTRL+F5. How I can resolve it.

Upvotes: 2

Views: 1222

Answers (2)

Syeda Afroza
Syeda Afroza

Reputation: 3

I tried with window.location.reload(true); but it didn't work. Then, I just reloaded the specific div of the list:

$('#myDiv').load(document.URL +  '#mydiv');

it worked just fine.

Upvotes: 0

Shadow
Shadow

Reputation: 9427

Have you tried location.reload(true)?

See the forcedReload parameter on https://developer.mozilla.org/en-US/docs/Web/API/Location/reload

Upvotes: 1

Related Questions