Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
maxim1500
Partner - Creator
Partner - Creator

Session lost when changing html page on mashup

Hi,

I have a multi-pages mashup with embedded qlik charts. It appears that the session is not kept when moving from a page to the other. The only way I was able to keep the session was to open the other page in another tab, while keeping the first page opened. I am not using identities.

In other words, as long as one page is kept open, the session is maintained. But if you navigate to another page in the same tab, the session is destroyed and recreated when the second page is loaded.

Is there any way to avoid this? I read some other people reporting this issue, but no solution have been posted so far.

Thanks!

24 Replies
Not applicable

Did you find a solution ?

balexbyrd
Contributor III
Contributor III

Thanks and please keep this updated. I have the same issue.

In code:

window.open('index.html', '_blank');   <---- selections transfer because of the use of '_blank'. This opens a new tab.

window.open('index.html', '_self');   <---- doesn't work. Loads the webpage in the same tab without selections


I've noticed that when I using '_blank' to open another tab, I can then navigate to other .html pages within that new tab and the selections will transfer. I've tried this on the server and desktop and get the same result.


I tried to trick the browser and tried window.open('', '_self'); and then tried to open the same .html page within self and

stevenkoppens
Partner - Contributor III
Partner - Contributor III

Hi guys,

true, window.open('index.html', '_blank'); works. You can also get this by just opening two windows with your mashup and navigating on only one of them...

We've also tried to some other stuff:

- Everything on one page, hide HTML with css/jquerry -> performance went down dramatically, to many objects.

- Injecting the HTML using JS, while keeping the the outside frame active (containing current selections object). and then reloading a part of the javascript. This works, but some cache or errors keep building up,so after some clicking the app gets really slow (probably has to do with requireJS).

Other idea I've got, but not sure whether we are able to build it -> keep saving current selections in cookie -> apply selections when you open a new page.

I've also raised a ticket at Qlik, hoping to raise the priority on this issue.

balexbyrd
Contributor III
Contributor III

Steven,

I have a hard time thinking Qlik is going to be able to fix this or is actively working on it given sense works in the same way (opening up two/multiple browsers) to keep the session state.

For example, on the server you go to the hub and click on an app. That app. opens in another tab which one can then navigate and the sessions are preserved.

That being said, I set my mashup up the same way with a landing home page which a user would then click on a subject area and it would open up a new tab. The only other way around this is to have everything on one page and hide/show as you mentioned which has performance impacts. I have bigger fish to fry, so the landing page approach will have to suffice for now. Good luck!

maxim1500
Partner - Creator
Partner - Creator
Author

I talked with people at Qlik about this, and they recommanded using a single page (one session) and destroying the model whenever you change "page" (in Angular, for example) or you hide the divs (if you do it yourself). That way, you won't get reduced performances.

We were using iframes and their guess was that we used to many sessions, and that Qlik Server would drop the sessions after a while.

Here is the code to disconnect charts before hidding them. If you have many, you could keep a collection and close the model for each chart.

var modelRef;

  1. app.getObject(<elemId>, <objId>).then(function(model) {

    modelRef = model;

}

//then when you want to close it

  1. modelRef.close();



Not applicable

An other possibilities is to create a bookmark before leave the first tab ( or first mashup page), apply this bookmark (it's the last bookmark) when you load the second mashup page and remove this bookmark.

stevenkoppens
Partner - Contributor III
Partner - Contributor III

Thanks for your help guys. Workaround we used was creating a landing page (like Alex suggested), and creating a connection to both apps we use. From there open a new tab while keeping the landing page alive. Not ideal, but works for now.

Also got a message from Qlik today, telling me this issue is under investigation and a bug have been filled regarding it. So hopefully we can avoid these workarounds all together in the future.

Anonymous
Not applicable

Please try to open a new page when load the mashup page, which is my walk-around.

I also have another issue about Qlik mashup.

We created a Qlik sense mashup with Qlik sense desktop 3.0, and published it Qlik server 3.0.

The mashup will be public available. All users could Anonymous Login.

How to set in Qlik server, so the selection of User_A on mashup will NOT impact the selection of User_B on the same mashup page at the same page?

Any suggestion is appreciated!

Anonymous
Not applicable

There are several possible methods:

1: use target="_blank", and open a new page

   however, target="_self" does not work.

2: put the multi mashup pages into one HTML, and use hide/display to hide/show different mashup pages. However, my mashup page loading becomes slow.

3: Qlik suggests create cookie to keep the selection, but I have not tried.


maxim1500
Partner - Creator
Partner - Creator
Author

We ended up writing our mashup with angular using a single page approach to avoid this issue. Of course, if you hit refresh, you will still loose your session.