Opening a link in a new page highjacks the referrer page - html

A client wishes to have a link that opens a new window and shows the website of an investment company.
Pretty straight forward so far.
So I create this link
Click Me
The client then tells me that the page is acting all weird. So I test it and he's right, it's acting very strange.
Here's what my tests shows.
Firefox mac: Page opens, then closes itself and returns to the window with the client's website where it then changes the URL to the one that is suppose to open.
Safari mac and Chrome mac: Page opens, then closes itself and returns to the window with the client's website
Client's IE: opening and closing multiple windows (his words, didn't test it myself);
Instead of redirecting to the page itself, I changed the link to go to the homepage. User will now have to click on "Login" to access the page we wanted originally. Guess what? It does the same thing.
Here's a simplified fiddle. You'll see it's pretty straight forward.
Now I know that the problem isn't from my side but on the investment site. They seem to dynamically add some parameters to the URL for security reasons I suppose.
My question is: how can I avoid all this non sense and simply open the page without it closing? Can someone explain to my why it's doing so?

I tried the login link myself (in Chrome) and it does the same thing.. closes itself.. You should contact their web-designers and report the problem. I succeeded to click on Stop loading button and look through page. Everything is "ok" except that thing it closes. Contact them and wait for response/fix.

Related

Block redirects and page reloads within the same tab

Scenario:
I enter a web page
Page shows desired content for a few seconds
It reloads and opens another web page (within the same tab, no new tab is fired - usually an ad)
I press the back button and the desired page opens again
How can i block this behaviour having only the desired page displayed, without reloading.
What actually causes this? I have some extensions for blocking redirects, but they work only on new tab redirects.
I am also a software engineer so a technical explanation would help me, if possible.

When designing website is opening new tab as bad as a popup window

My web application is mimicing the UI of my desktop application, flow is as follows
Select Task in browser window
Change any Options and then start
Show Progress in same browser window, the progress bar goess back to server every 5 seconds checking progress.
When task has completed we show report in new tab
and go back to Select task Window,
this is done by running following Javascript in progress page
window.open('/start','_self'); window.open('/reporturl','_blank');
This works fine on my PC but when trying on Safari on OSX and on Android phone and iPad one of two things happen
The progress page becomes the start page but the report page is not opened in tab
The Progress page becomes the report page
My question is does opening window in new tab with _blank have all the problems of using popup windows. If so should I modify my prcoess so that at stage 3 it just displays report page, and then add a back button or navigable footer to the report to allow user to get back to start page ?
I can think of some options you could use instead of new tab.
Modal with Ajax
-- With jQuery it is posible to open modal
dialogs they can be populated with html (or other data) fetched with ajax (async). I am a big fan of these and use them all over my projects. Users will not be annoyed with pop-up warning messages, etc. Once the content is read (or whatever) the user can simply close the dialog. (If I had to make your app I would certainly implement this).
Besides the jQuery dialogs, other modal/dialog scripts are out there. Check out Bootstrap Modal if you like it modern.
Serve report as download
-- Depending on what the user can/will do with the report, it might be interesting to write the report page in a way that it sends back a .pdf file, or another type of file, as download. Loading the URL in a new tab will now always start a download. Triggering this from JS without user interaction might be a problem though (same as with pop-up / new tab). Adding a button to trigger the download on complete will solve this.
I know the question was about the use of tabs.. But try to avoid it. Browsers handle it all in their own way. And many users get confused when suddenly stuff is opening in tabs when they did not ask for it. In case of pop-ups, it is possible for users to turn them of or convert into opening a new tab from within the browser settings. If they have been fiddling with browser defaults, you'll have troubles of keeping the 'flow' of the app the same for all users (and cross browser).

'Back' button and 'history.go(-1)' not working with Chrome

Got an odd problem, only persistent in Chrome browser. Can't imagine what would be the problem. Chrome's "Back" button doesn't work, nor does history.go(-1), but works fine on all other browsers. To see the problem simply click this link, which will asynchronously initiate searches on two separate services, or sites if you will. Upon click on any search result list item, we traverse to another page, but "Back" doesn't work for Chrome.
http://vps-net.com/MSSMine/?search=some
Any suggestions or ideas are welcome.
I found the problem with the page you have linked, I don't believe it to be an issue with Chrome.
When you load the page, it also loads two iFrames as the request to the site finishes. Chrome takes a somewhat different approach to history, allowing you to navigate not simply from changes in the URL displayed, but through every new individual browser-initiated request. When the iFrames load, Chrome adds history for each step of the page loading process, creating 4 separate history items. When you go back 1 "page load", it takes you back to the site you linked to, at a different step in the process. You aren't seeing anything change because as soon as that page loads, any unloaded iFrame now loads again.
If you do history.go(-8) or some other large number, you should see the page at that many pageloads ago. However, if the link is opened "in a new tab" then the history begins for that tab at the URL you told it to open, effectively limiting the history to the pages that occurred during that tab's lifespan.
This was tested on Chrome 34.0.1847.116 running under Ubuntu 13.10.
My back button was not working as well, but it would not work with any browser. I went into my add/delete software and deleted what software was added the night before - BOOM! All is fine now.

How can I make my web page not auto refreshing when comming back using back button?

I am developing a web page and I am testing it using httpd web server and Firefox. That page is a simple serach engine - providing key words and relevant items will be displayed using AJAX.
My question comes here, every time I click those items to go to another page and try to come back using the browser’s back button, all the contents disappeared and I have to search again.
How can I keep those items?
Take a look at google.com and what happens when you type but do not press enter.
Then read this
Modify Address Bar URL in AJAX App to Match Current State

Error with IE and form data when clicking back

Say if I am on page 1 , I enter my form data and go to page 2 , But wait I forgot something and I need to go back. FireFox and Safari ask me if I want to resend my form data.
But IE being IE it just goes back and does not show the page.
Is there away around this when I click back it keeps the data and the page appears.
Sorry I cannot give a link but the process for u to go through on my site to get to this part would take you a while.
My suspicion is that your talking about a wizard form. Where each part of the form is a page and you can go backwards and forwards through the pages.
the back button has always caused problems for developers on the web and this is probably the most annoying.
You can stop the IE back button issue by redirecting on the server to the next page when you receive a form post rather than just delivering the form back to the browser. Doing this means that the browser considers each page to have been a get and stops asking you if you want to resubmit the form.
to do this simply make each form post to itself and then return a redirect to the next page of the wizard. I'd give examples but I'm not sure what language you are using on the server.
the other alternative is to use javascript to create a wizard from your form see this jQuery wizard form demo.
create a new back button besides the submit button and when a user clicks on either one you call a javascript function which modifies the form action either to the next page or the previous page.