I am currently working on a website that is still pretty simple.
You can click on ingredients and it shows you possible meals you could make with the selected ingredients.
While the site is working as intended on PC (tested on two different PCs), the page is loading infinitely on mobile (tested on android: chrome and firefox).
If I exclude my app.js file, the site is loading normally, so I guess the problem is somewhere in there.
The code is rather long (over 250 lines) so I don't know how I should upload it.
I googled my problem but found nothing so far, would be great if anybody could help.
If anyone has the same problem:
I was able to find the problem after some additional debugging.
There was a problem in the calculation of the element's locations in js.
If the width of my parent div falls below a specific value, the script is rounding down to 0 and is trying to divide by 0 in the next line.
I am still confused because usually js is responding with an error to division by 0, but at least it works now..
Related
Recently I've been testing my website using screen readers and ran into a page that lags like crazy when using NVDA. More specifically:
All browser actions are substantially delayed, but NVDA itself runs perfectly fine
For example, the page normally loads in its entirety in less than a second, but with NVDA active, the first image can take several minutes to render
Refreshing the page takes several minutes to execute
Even switching or closing the tab takes several seconds
After some extensive debugging, I isolated the issue into a rather specific set of criteria causing the slowdown:
This only happens on Firefox (I'm currently on Firefox 90); Chrome and Edge are fine
This only happens with NVDA; VoiceOver on Mac is fine even on Firefox. I do not have JAWS.
The action causing a slow down is setting an element's textContent on every requestAnimationFrame, so it's happening dozens of times per second
I am uncertain if this is experimentally significant, but I'm running on Windows 10 Home
I managed to scrape together a minimal CodePen example. I used CodePen here because the simplest way I could replicate the issue was by refreshing the page. In the example is a refresh button that activates a spinner, so if the page is fast the spinner will show up for only a brief moment; if it's slow then you'll get to observe the spinner in all its glory.
What I see when I try to refresh:
So while I isolated what is causing the issue, I have no idea why this is happening and hence how to solve my original page's problem without deactivating the widget outright.
What might be the underlying cause(s) of Firefox/NVDA slowing down on a page setting textContent?
Is there an alternative to setting textContent that I can or perhaps should consider?
Is this perhaps an issue that should be filed directly with either Firefox, NVDA, or both?
Thank you!
Addendum:
NVDA Github Issue: This open issue indicates long pages are slow to load, which may be related to my problem
My Website's Page: The page on my website I'm talking about
I've been working on a CSS / HTML drop down navigation for my blogspot.com site. After coding it a few hours I had accidentally closed the tab to find out no matter what or where I tried the CSS on blogspot, the CSS wouldn't work again. Now, the HTML/CSS works anywhere else, just not on blogspot anymore.
These are the things I did:
1. Created a entire new blog under the same account, then applied
html/css
2. Cleared cookies, cache and restarted browser
3. Tried multiple browsers
4. Used stylish extension to override
5. Used console in firefox to edit HTML on other sites and added my
code to see if it worked elseware
6. Used a different computer
7. Used mobile network instead of ISP
Despite doing everything pretty much to get the css/html to work blogspot, it will refuse it now no matter what. I am guessing it is obviously an issues with blogspot.com such as a glitch or bug that I may have now caused. It also shows a lot of CSS code struck out in the styles inspector when you inspect a site via right-click.
I dab in javascript / jquery sometimes and I am wondering if there is a way to force my CSS to force override.
CSS/HTML http://jsfiddle.net/rpksx66u/
My blogspot site: https://vitalintel.blogspot.com/
Im about to pull my hair out.
update: so I moved the css/html/script element to another part of the page and it works. When the element is placed in the Cross-Column's sections in layout, it refuses to use any CSS.
I am working on an web application in MCV asp.net that needs to work in IE. Loading the application with data for some customers we get the "The page can not displayed" using IE10 and IE11.
More details are
It works in Firefox.
The error is only there for large pages = larger DOM
An exampel of a large page is a body of 4.6MB measured by Fiddler
For small pages there are no problems
The error page apears instantly when loading a customer
We have tried the following, but with no luck:
Removing stepwise elements from a big page and at some point it will start working, since it just removing sets of the same elements, nothing is being removed that could couse the problem - maybe its something with the size of the http-response?
Changed some IE settings
Stripping away all Jquery and CSS, to see if it was some DOM traversal issues
Tjekking the http-response to look for any bugs - non found
Google around seams that IE will show this page in some situations, but not found anything to fix this problem, where the application works on some pages but not on others.
Any suggestions?
The answer to why it does not work in IE is that you can not have more then about 200 AntiForgeryTokens, above that will make IE not load the page.
The quick solution: reduce the number of AntiForgeryTokens, we could do it by not having a delete form per element.
So I've been working on a website, and the main focus of the site is a javascript-driven 3D carousel, and I got the code for the carousel from here: https://github.com/kaizouman/3dcarousel
I integrated the code into my site, and only modified the number of carousel items and the size of each item. I left the rest of the code untouched (demo.js and 3dcarousel.js). It works perfectly, but only most of the time. I've noticed that it'll work perfectly in Chrome about 90% of the time, in Safari about 80% of the time, and in Microsoft Edge & IE, it pretty much never works. When it doesn't work, it just loads each image individually. When it happens in Chrome, if I keep refreshing the page, it'll eventually work properly. Also interestingly, when I navigate to another page in Chrome and then hit the back button, the carousel will always fail to load.
Here's what it looks like in Microsoft Edge and also when it fails to load in Chrome:
And here's what it looks like when it loads properly:
I can't for the life of me begin to figure out why this is happening, does anyone have any idea? The website is located at http://lipocircuit.com/new.html.
WOW this was a simple fix, I just commented out the line that includes the prefixfree.min.js script, I guess that's outdated and not needed anymore. I feel dumb but I'll leave this up in case anyone else has this issue.
I've built a Javascript-heavy web app and recently tweaked it to work on iPad (it needed tweaks because it allows drawing by moving the mouse around, and onmousedown/onmousemove would not get triggered until finger release).
Now, with the tweaks, the app runs fine on Mobile Safari. I'm seeing a problem, however, where the first time I try to load the app on the iPad, it often crashes Mobile Safari. However, reopening the browser and refreshing the page loads the app perfectly and it's fully usable. After doing some research I found out that the most common cause for Mobile Safari crash is over 6MB of pictures or multiple pictures loaded through Javascript. My app only uses images for icons, so the total image size is actually very small (probably under 100KB total), my JS code, however, is 2.5MB uncompressed and 350KB compressed using gz (which is how I'm sending it to the client).
I've also read that loading images through CSS can avoid crashes due to the image size limit. I figured it was worth a try since it's also possible the crash is due to large number of images, not just total image size. After changing some of my icons to be rendered using CSS background-image property, the crash seemed to have gone. I decided to go a step further and tweak all other icons to render using CSS backgrounds as well. After changing all of my images to be rendered using CSS, all of a sudden the crash seems to be back.
Which leads me to several possible conclusions:
A.) Even the partial CSS fix I made did not actually help but somehow I got extremely lucky and saw no crash while reloading my app and restarting the iPad multiple times (then the crash is likely somewhere with my JS code or other parts of the page)
B.) I introduced some other issue when changing the rest of my icons to load through css (if that's the case, I wouldn't expect reloading the page to fix the issue, but it does)
C.) The crash is due to something in my Javascript unrelated to images (but then why does it load and work correctly after reload)
D.) iPad chokes when trying to render/uncompress that much Javascript at once (I haven't heard of this being an issue, but it's also rare to see a chunk of Javascript this big)
Does anyone know what other issues aside from 6MB image limit can cause Mobile Safari to crash the first time a page is loaded, but not the second?
If it helps, here is the link to my web app (this is the old version that loads images through JS): http://www.grafpad.com/grafpad/canvas/demo (it's written in Pyjamas, which is why there is so much generated Javascript).
Thanks
You need to remember that compared to your desktop the iPad is seriously underpowered. Its particularly limited in memory. I noticed right away that there were many, many script blocks on the page. Without tearing your app apart completely to try and find the culprit you might start by combining, just to see if its just dealing with that many nodes that is causing the crash.