i am trying to develop a web application using a master page on asp.net 4. the application needs to work on an ipad.
i had the site already built, but it loaded so slowly that it timed-out, so i decided to rebuild from scratch to see what might be causing the issue. i put in the least amount of html possible to test, and it loaded in under a second. however, as soon as i added
<script type="text/javascript">
</script>
within the master page head tag the site took close to 10 seconds to load. the same problem occurs if i add a .net control to the content page.
i am using an ipad 3 with javascript turned on.
does anyone have any ideas?
Related
I got a strange problem on my site taikuri Kim Wist on mobile view. I don't know if the problem is on Apple devices, but with Samsung and Android devices it is definitely there.
When typing the root domain address, the page wont load and keeps jumping back and fort. Furthermore it jumps directly to another page on my site which is an inner page.
There is on line 109 of the index page a javascript file js/script.js
If I remove this script, the problem goes away, but the script is needed to operate the middle (stellar) section of the page. I have not modified the script.js file in any way and there was no problem one week ago. I made a new footer to my page, but it should not generate an error like this.
If anyone knows why this occurs I would be very grateful.
I was able eventually to find the error, which was inside script.js file.
I commented out //window.location.href = $(this).attr("href"); on line 85.
This solved the problem and the page is now displaying correctly on Android devices.
I have designed a website using Wordpress and caching it with W3 Total Cache. I have experience with them both but I encountered the next problem.
The website http://atelieruldigital.com is a one page website, with another page for the partners of the program (http://atelieruldigital.com/parteneri/). When I access the partner page, everything loads as it should. When I access the main page by clicking "Acasă" or the logo, I have the next behaviors:
Google Chrome: everything loads as it should;
Mozilla Firefox: the scripts have lots of errors in the console and the page loads broken. I have to refresh (F5) to make it work as intended;
Microsoft Edge: the same problem as Mozilla.
I am using manually minifying, only by combining the scripts, excepting the mobile-menu.js, which grants error when I try to combine it. I do not use page caching, only object and browser caching. The theme is a custom theme, based on Twenty Sixteen.
If I disable the caching plugin, everything works as intended. But I need it to help the page load faster.
I have found the solution after a couple of days of debugging. It seems like when manually combining the .js files, I had to switch around some in the load order.
I'm looking for help understanding a bizarre loading delay on iOS. I have this exact HTML:
<!DOCTYPE html>
<img src="img/potatoes0.png"/>
<img src="img/potatoes1.png"/>
<img src="img/potatoes2.png"/>
<img src="img/potatoes3.png"/>
<img src="img/potatoes4.png"/>
<img src="img/potatoes5.png"/>
<img src="img/potatoes6.png"/>
<img src="img/potatoes7.png"/>
<script src="js/jquery-2.1.4.min.js"></script>
…plus eight identical images of potatoes and a copy of jQuery, all hosted on a remote web server.
This page loads pretty much instantly in a normal browser, but Safari on an iPhone (or in the iOS simulator on my computer) waits 11 seconds before loading the JS:
The images all load basically at once, then the browser waits around 10 seconds before starting to load the JS.
I've confirmed with Wireshark that the request doesn't go out until around the ten second mark, the delay is not server-side.
If I add more images, the delay increases (e.g. to 30 seconds), even though the images still take well under a second to all load.
If I add more JavaScript files, the browser loads them all simultaneously after the delay.
What the heck is going on?
I don't think this is anything to do with jQuery or DOM load events.
I have encountered exactly the same problem testing on an iPod and iPad running iOS 9. I thought I was going nuts.
I created a file called test.js that contains this:
alert("test");
Placing this as a script include at the bottom of my page (just before the body close tag) introduces a significant delay before the file is executed.
Placing the file at the top doesn't cause any issues, so is my only solution currently.
Testing on various non-iOS devices and browsers does not show this problem.
#Sidnicious any chance you can test with a simple file like mine instead of jQuery?
Edit: I found a popular site that includes its JS at the bottom:
getbootstrap.com. I visit that site on an iPod or iPad, refresh the page a couple of times and page loading freezes for 10-20 seconds before the JS loads.
jQuery does not trigger until the entire DOM loads.
So, if you have a bunch of images - jQuery wont trigger till all of them are downloaded. To speed this up, try lazy loading your images.
One thing to note on Javscript in all forms as it applies to mobile browsers. If you have any kind of scrolling going on - Javascript will delay running until scrolling stops (this is to reduce battery drain on mobile devices by reducing the load on the processor). This may or may not be related to your issue, but should be noted whenever a JS problem arises only on mobile browsers.
I have a jQuery Mobile PhoneGap app that loads all of my pages fine, except for then my app starts up.
The application shows a screen that says Phone gap IPhone non-retina and then shows all of the pages I have created on one screen before my application starts. I load the stylesheets scripts and html body dynamically in a java script file.
Is this a problem that would be occurring on my end, phone gaps end, or JQM end? I will supply code if need be.
I am using JQM 1.2.0 JQuery 1.8 and JQM 1.2.0 css
The flicker happens between the splash page and my first page load.I use this javascript to load the pages into my index.html
javascript:
$("body").load(remoteURL + "body.html?v="+getTimeStamp(),function()
{
loadPage();
}
It take some time, for all scripts to load and your page to set up. You can go to the Phonegap.plist and disable the AutoHideSplashScreen and hide the splash screen from javascript, once the page is fully loaded with:
navigator.splashscreen.hide();
This fixed the problem for me.
I created a mobile site in html and jquery, but it is not loading properly in Chrome (or on an iphone). There is no backend to the site - all changes to content would happen right through editing the html. Inside of my html, I made no specific reference to ajax. And, each page links through "#pageid. The problem is that as I navigate the site, various pages do not display correctly unless I hit "refresh." URL is mobile.shorelinelake.com. I am VERY new to this, so please be patient with a newbie :) Thanks for any help!
http://mobile.shorelinelake.com (if you click through to "Lake" and then "Sailing," or "Cafe" to "Menu," you can see the problem - the page jumps after loading, cuts off the header, places content below the footer, or will entirely hide jquery elements...)
One thing I noticed right away is that your using an old version of Jquery and Jquery Mobile. There have been alot of improvements since the alpha that you are using. Also you are linking to a few files that aren't there. Phonegap.js and ajax-loader.gif for some reason are not found. In my console I see 196 warnings that I believe are all related to you using old versions.
Also you have 31 html errors. One example is here
line 88:
<a href="tel:16509657474" div data-role="button" data-theme="c" class="ui-btn-text">
You have alot of stranded </p> tags. Most of them are in the menu page. Fixing these errors is necessary to troubleshoot your problem. Try running your document through an html5 validator to find these mistakes.
I also recommend breaking this into smaller pieces. Here is my reasoning:
Easier to maintain and edit.
Keep the dom size reasonable. Jquery will remove the old pages from the dom keeping it very manageable.
Faster page loading resulting in a better user experience. Your user will probably not be going to each page. Only load what they need to see.
Bandwidth could be costing your user extra money on a mobile device.