Ionic Lag Between Transtions - javascript

I'm working on an Ionic v1 tabbed application with a few images and lists displayed.
When I'm testing the app on any Android Device, I experience a 1-5 second lag between selecting the device's back button and when the transition takes place.
This happens when I navigate to a new page within a tab, scroll down, then select the back button.
The back button on the app itself works just fine with no lag
If I navigate to the new page and don't scroll, the device back button works fine
I'm not displaying a lot of data at one time. This lag occurs even with a single image displayed
I've had this issue for quite some time, there's several Github tickets on this but none of them have a solution. Anyone have any ideas whatsoever on how to resolve this?

Turns out that enabling JS Scrolling where I have a fair amount of content fixes my issue. By default I leave it disabled on Android, and utilize overflow-scroll="true" on views where it's needed.
Note this issue does not occur when using collection-repeat

Related

Javascript - Page slow to show after not being the active tab

So I have developed a webpage containing some javascript and a couple of HighChart charts.
The page generally works great, every few seconds data is fetched from the server using an ajax request, and the chart is updated.
The issue happens when I have switched to a different tab for a few minutes and then want to go back. The page can take a very long time to show up. This happens on both Chrome and Firefox.
I couldn't really find out how the browser is handling javascript and page updates in non-active tabs, but it seems to be related at least.
Any ideas on how to improve the time it takes for the page to show?
To be perfectly clear, the page has no visible performance issues while it is the active tab.
So it turns out we froze highcharts just a couple of versions before this fix went in.
When we upgraded the version, everything worked great!
Many thanks to #WojciechChmiel for pointing me in the right direction.

Slidemenu won't load the first time in JQuery Mobile App

I have a Jquery Mobile app with a slidemenu in the global page, and it appears with the press of a button or a swipe on the screen, facebook style. My problem is that the first time the app loads, the menu never pops out, even if you press the button a thousand times. You have to refresh the page and then in works in all the pages of the app for the lifetime of the session. If you logout and enter again, you need to refresh.
You can see a example here: http://cic-team.no-ip.biz:9090/apex/f?p=112:2 User: Demo Passw: 1234abc
The menu it's in an "After Header" region as a "List: Menu" type with this custom template: http://i236.photobucket.com/albums/ff289/Best1989/template.png
The button has the following attributes:
data-slidemenu="#slidemenu" data-slideopen="false" style="margin-left:0px !important;"
Maybe the Javascript or the CSS are not loading correctly the first time, but inserting the menu in other region has not worked for me. I'll gladly read your suggestions and comments.
I'm using Apex 4.2.0.
Thanks in advance.
With some research I found the answer to my question, please check this:
http://www.gajotres.net/how-jquery-mobile-page-handling-affects-javascript-executions/
The problem was that I wasn't loading the menu classes at the Login page (which is the first of all) and when you actually got to the page where the button and menu is displayed, it didn't load the classes.
Solved the problem loading the components in the first page but keeping them hidden.

Sencha Touch 2 App refuses to load content after a few days usage

First off, some context: we're building a sencha touch 2 app which works pretty well. It's basically a list with a panel which displays the content of an article that is currently tapped in the list. Kind of an RSS reader.
However, after using the app a couple of days, it turns out that it refuses to load content. Refreshing the page or reopening the app doesn't help - only manually clearing cache does.
Does anyone have a clue on how to solve this one? I obviously just clear all the elements in a given container when tapping a new item, so I wouldn't know what takes up so much cache...

Javascript jquery locks up in Safari (only)

I've created a website which uses javascript to run a jquery gallery viewer. A problem surfaces when using the gallery in Safari only (but not with Chrome, Firefox, etc).
At first, the gallery runs smoothly. But if you click through enough pictures (on a single gallery page, or over several pages containing different galleries) eventually the gallery script stops working. At that point, all of the gallery functions stop, even if you visit a different gallery on a different page in the website. Neither refreshing the page, a hard refresh, clearing the cache, visiting a different gallery/page, or closing the tab and re-opening in a new tab, brings back the functionality. The only way to get it working again is to close the Safari window, open a new window, and go to the page again. (I wonder what the browsing session has to do with this?)
I have tried using the console, and tried using Firebug Lite, to diagnose the problem, without success. No errors appear in the console when the script stops working; the controls just stop working.
I can duplicate the problem reliably on different machines running Safari (most easily by repeatedly and quickly cycling through the pictures in a gallery over and over till it locks up). I cannot duplicate the problem using any other browser.
Any help in figuring out what's wrong, or even suggestions of how to troubleshoot the problem, would be greatly appreciated!
The galleries can be found here:
http://www.gailcohenphotography.com/galleries.html
Many thanks,
- Paul

Nivo slider images flashing when pulled from database

I'm trying to use Nivo Slider with a database of images. It works, but images don't load properly. Instead, they flash. It appears as though they're completely reloading every time, instead of only on the initial load. It's a strange issue.
It's on this page: http://www.holyfamilyshorewood.org/
Someone else set up the database, so I'm not entirely sure how to fix this issue.
This issue only appears in Chrome. But there is a fix for that.
Instructions are for IIS6 but i guess it is basically the same for IIS7.
Open IIS and navigate to the folder in the website which contains the
images you're having problems with. Right click it and select Properties:
In the dialog window, select the HTTP Headers tab:
Tick the Enable Content Expiration box.
Set the Expire After option and set it to 30 Minutes, or whatever
you're comfortable with.
Press OK.
This is discussed here.

Categories