Navigation back causes page reload in Chrome - google-chrome

I have a single page PHP application that fetches data from a third party API and outputs the items in a product grid. Clicking on one of the products leads to an external url which opens in the same window.
When using the back button in Chrome to go back på the application after clicking the external link, the page reloads for some reason. I'm only experiencing this problem in Chrome, therefore I'm wondering if it could be a Chrome related bug?

Found the issue. It was caused by using a window load event incorrectly.

Related

Why chrome shows alert randomly when try to open custom protocol url with location.href?

i had took a look to another threads about chrome and custom protocol apps, but i couldn't resolve a doubt i've got. In my web app, when you click a button it fire a new tab with an webpage (window.open(url, "_blank")). The new tab is opened with the url (annother web app with https protocol). This url fire a javascript function on load that verifies some things and then generate a custom url, for example myurl://base64code, and put it in an existing iframe in this way windows.frames['myframe'].location.href=theCustomProtocolUrl. i tried in different ways (location.replace, create a new iframe and set the url, etc) and i always have the same problem. If i refresh (ctrl f5) the page it always show the dialog or if i open the link with the developer console opened. But if i click my button and the page is opened in a new tab it doesn't work only if i refresh (ctrl+f5). This works perfectly on IE11, it launch the app directly.
Any ideas why chrome, and edge, works like this?
UPDATE: I have found the reason, is i use the protocolcheck.js (https://gist.github.com/vladimirtsyupko/cfcd332476b16683bb0b) library.
First i tried to open a protocol with the timeoutHack (it use blur event) and then, after failing, it fires the other url (in this case https) and the dialog doensn't appear. I found a bug with blur event on chrome > 85 https://bugs.chromium.org/p/chromium/issues/detail?id=1137801
Thanks in advance

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

Chrome cancels request on link clicking befoe the page totally loaded. And FF doesn't

There is a front-end problem in my web-app:
for example I have a page with plenty of JS code executed on that page. There is a link on it like
Examle Link
I want to click on this link before page is loaded completely and actually I can do it in FireFox. Current page stops to loading and browser redirects me to clicked link.
But in Chrome nothing happens and I have to wait until the page will be fully loaded. In other case I see in DevTools that this request got "status=cancelled"
How can I change Chrome to treat my links in other way?
Chrome users don't want to wait till page is loaded if they want to go further clicking the link...
I had read about prerendering and similar stuff but still have no ideas how to resolve it...
I would appreciate for any hints.

Loading same AppCache - based url won't work on firefox and safari

I have an html that is AppCached. I load it on the safari/firefox and everything's fine.
then, I paste the same url and hitting enter in my keyboard, nothing happens (in Chrome it performs a reload).
The reason I'm interested in this scenario, is that I'm actually using URLs with hashtags, and I'm pasting the same URL, the hashtag is different and I wish the page to reload (this is the common use case in mobile when you click on links from email and such).
Can anyone explain why the browser won't reload?
If you want the page to refresh then you can't use hashtags, the whole point of hashtags is not to refresh the page when changing the URL. It sounds like what you need to do is listen to the hashchange event instead of doing it all in the load event.

Google Chrome intermittent load issue: possible to Programatically disable "Predict network actions..."?

I'm having a very strange problem with a site in Google Chrome:
When I click on a link (from a list view to a detail page), the page hangs and I Chrome throws up a dialogue asking me to kill the page. The page is never displayed.
But if I navigate directly to the page, it loads in Chrome without any problems. Both actions (clicking on a link or navigating to the page) work fine in Safari and Firefox.
Disabling "Predict network actions to improve page load performance" in Chrome's settings seems to fix the problem, but this is not a viable solution as I don't have any control of my user's browser settings.
Some more detail about the situation:
The link is just a regular <href>. I'm not doing any javascript
click() handling or anything else. I'm not using any 'prefetch' or 'prerender' <link> elements.
The pages all validate using the W3
html5 validator.
The page I'm navigating to loads a lot of JS, uses Knockout.js for rendering and loads a video file over HTTP.
On the occasions that the page does load (after a very long wait),
Chrome appears to have rendered the entire page in the background and
loaded all external resources. If I navigate directly to the page it
doesn't preload anything though (I'm using knockout to show a 'please
wait' message while the external resources load).
When I log the network requests using Charles, it appears that
Chrome loads the HTML for the page instantly, but the requests for
the external resources seem to take forever.
If I look at the CPU usage in Activity Monitor, 'Google Chrome Renderer' uses 100% CPU when loading from the href, but only 30% when loading directly from the page.
I'm using the latest version of Chrome (22.0.1229.94)
So - my question
Is there a way to programatically disable "Predict network actions to improve page load performance"?
Or is there some other solution to this problem?
Just going through high voted unanswered questions I came across this one, and I once got into a similar situation for entirely different reasons (chrome was preloading a huge file I couldn't afford to load for every user). The fairly simple solution I applied back then was to open the link through Javascript rather than a simple href which worked wonders. Either way, your problem might already be solved, but seeing the number of views I thought I could at least share this small insight.