Page load from browser back button click - google-chrome

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.

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?

How do I completely load a pinned youtube tab in background on chrome startup?

Everytime I startup Chrome with Youtube pinned It doesn't load the youtube page completely until I make the tab active - i.e. I click on it. Interestingly tho it's status according to chrome.tabs.get() is 'complete'.
Here is an example
As you can see, the youtube wasn't loaded until I clicked on it's tab, while stackoverflows website didn't
have to do any loading.
Is there any way I can completely load youtube on chrome startup without explicitly making the tab active i.e. by clicking on it? I tried to execute reload on chrome window startup via chrome.tabs.reload(pinned_tab_id);, but it doesn't help.

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.

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

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.

HTML: How to halt image loading on link click

I have a page with a few hundred images. If the user clicks a link while the images are loading, the page isn't refreshed until ALL the images are loaded. A savvy user presses ESC and then clicks the link, but I can't expect my users to do that.
Is there a way to get all other actions to take precedence over the image loading? Do I have to go to some javascript lazy-loading and then ruin the site for non-js users?
Example Page http://metaward.com/6
What browser are you using and what operating system? On my machine, Vista with firefox 3 clicking a link before all images load works just fine.