Avoid back button from refreshing a page on IE/Chrome browser - html

I have developed a webpage which has an option to "Add link". On clicking the button, the user gets a pop up window to add a link. Once he submits the entry the base page refreshes to show up as a hyperlink and not "Add link" anymore. When the user clicks on the link, he gets redirected to the webpage belonging to the link. On clicking the back button on IE/chrome from the webpage corresponding to the link he comes back to the initial page but with an option of "Add link" again. Which is incorrect, he should just see the link and not an option to add link. However on refreshing the page it goes back to show the link. Noticing this issue only on IE and google chrome and works well with Mozilla Firefox. Kindly help.

Related

On mobile Chrome, if you click "back", you will have the last page states remained, is it possible to do it on desktop?

I found that if you are on a mobile chrome page, when you click a link to open another page (in the same tab), and then if you click "back" button, you will have the previous state remained.
For instance, on an interactive page (let's say it's examplea.com), you did a lot of actions and the DOM is totally changed, then you occasionally opened a new page in the same tab by clicking a link or somehow. The new page is exampleb.com.
On desktop, when you click the "back" button, it will redirects you back to examplea.com and everything is gone.
On mobile, when you click the "back" button, it will redirects you back to examplea.com with everything unchanged.
Is there any trick that I could make this also happen on desktop?

Clicking link with target _blank makes browser close new tab immediatly

Clicking on a link to our webpage using
Link
opens a new tab and closes it immediatly. This happens on all browsers apparently. Deactivating adblock and alike does not change anything.
Using the url without target="_blank" or right click -> open in new Tab however works fine.
The web page is an angular project and does not use any sort of trackers. Furthermore this behavior started only recently, so I assume it's due to some change in the page.
Any hint why this happens or where to start debugging this?
Found it.
I had a line window.close(); due to a workaround for a popup for facebook login, implementing this:
Facebook Login not working in PWA app if app is in stand alone state

IFrame log out service after page refreshing

I've got a website with an iframe in it with another website and every time user refreshes the page he becomes logged out. I thought this is because reloading clears cookies (with JSESSIONID cookie), but navigation on other sites doesn't logs the user out.
For example, if I click https://google.com link, then click back button, I will be still logged in in the website that is in iframe. But if I click refresh button, I will be logged out.

Page load from browser back button click

Is there a way to detect if the page load occurred from clicking the browser back button?
I have to take a different action on page load if it was due to user landing on the page by hitting the browser back button.

how to open more than one tab using Anchor Tag

Click Here
In this, when clicking the link, the popup are opening.
But i want to open both in the new tab . Help me in solving the problem.
You can try this method:
Click Here
Answer is also available at
How can I open multiple links using a single anchor tag
Unfortunately this no longer works in the major browsers to prevent spam.
As at October 2020:
Chrome: Opens the first onClick link only.
Firefox: Opens the first onClick link, then displays a banner saying "Firefox blocked a popup from opening.
Safari: Working ok. All tabs open.