Animated gif does not animate on page load in IE - javascript

I have a resource intensive ASP.NET page. I have a div element with an image that I set the visibility for before and the after the page loads. This fails in IE. IE stops animating the image.
I have tried all possible solutions that were presented in different message boards with no luck.
Any help is really appreciated.

My guess is your are using an UpdatePanel and IE is pegged trying to parse the DOM. See this article for KB 2000262 - Fix: UpdatePanel Async Postbacks Slow in Internet Explorer. Check your task manager when this happens and see if IExplore.exe is %100.

Related

My site is not rendering properly in chrome, Could this happen if Bootstrap and a CSS3 Class conflicted?

I am working on a new page, the domain is quite large and I have never encountered this problem. I have finished my page that shows very well in all internet browsers, except in Chrome, I have cleaned the cache and nothing fixes
Could it be my CSS?
Any experience and / or suggestion?
In the image on the left is EDGE on the right is Chrome
If you think your code is error-free and it is the caches you're having trouble with. Then try pressing CTRL+F5 to reload the page. It works for me when the changes in the page are not being applied consistently.
It was conflicting attributes between a personal CSS3 Class and a bootstrap class, each browser would render differentely

Should a script load first or images?

I am using a JavaScript library to arrange few images on the webpage. The following browsers:
Firefox
IE 11
Microsoft edge
render the page as it was planned, the problem occurs with Chrome browser. It messes up the complete layout.
The above browsers don't load any content unless all the images have been downloaded, until then it shows a blank white screen, and all of a sudden it will show all the content rendered perfectly. And in case of Chrome, the browser displays content on the go, as in you can see the images appearing in a scanline fashion.
I've tried calling the function that arranges these images inside:
$(window).load(function() {})
and it didn't fix the issue, I tried calling this in the <head></head> and also just before closing </body>, that didn't fix it either. Is this a Chrome related issue?
What should be the correct point in time where the function should be called?
There is a nice library on the web with a comprehensive name imagesLoaded designed to fix your issue! It is supposed to work cross-browser of course, so no differences in behaviour in Chrome or other browsers.
With its help, you can run your code at the moment when all images loaded in specific DOM element or elements controlled by jQuery selector. Like:
$('body').imagesLoaded( function() {
// images have loaded
});
There are also .done, .fail, .progress callbacks supported if you need, so check the docs.
In some cases you have to wait until the image loads to get a parameter not specified in the <img> tag, such as height for example. Then you may use $(window).load
In other cases, for example, adding some classes to the images, you can do it before the image load.
If you want to load the images after the page loads completely or when the user really scroll and see each image, Lazy Load is a good plugin and it support callbacks.
Images should load First as hidden, Then your script should run like
$(document).ready(function(){
// here do the scripting may be showing them one by one
});

jQuery Slider not working properly on WebKit browsers

I'm in charge of a website that is using a jQuery slider called "Accessible News Slider" and can be found # https://github.com/rip747/Yahoo-style-news-slider-for-jQuery. The website is http://thebright.com. When viewing the site on Firefox or IE, the slider works just fine, but when viewing in any webkit browser, the images for each slider load slowly and makes it look like they're falling from the top.
I'm not sure whether this is an actual bug in webkit or if this is something that I am causing by trying to gzip the images so the website will load faster. If anyone else has experienced this problem and knows how to fix it, I'm all ears. I'd also like to know if anyone else has seen this problem, but hasn't been able to fix it.
Thank you.
First : Optimize all the images. As per Google Page Speed (http://thebright.com), you can reduce another 233 KB, which will make your site fast.
Second : The issue that you mentioned - When you check the network tab in Google Chrome, clearly, there is some issue with the Cache Expiry header. Some how it is not setting Expiry header properly. So, every time you go to a page, it is loading the image once again even it was loaded previously. The current value that it is showing is : Expires:access plus 1 month. Seems Apache HTTP Server is not handling this header properly.

Script sometimes delays page load, how can I test/resolve?

I have a website where sometimes it loads quickly, however sometimes it seems as though the page has stopped loading half way through, possibly due to a script.
The website is http://www.pinspired.com - The tabbed sidebar on the right is the problem. I am using a simple jquery tab plugin and twitter and facebook script in the tabs.
Firstly, does the page load quickly for you?
How can I find out which script is stopping the rest of the page loading. It is hard to test as it only happens occasionally.
Thanks in advance.
I just ran the dev tools and it looked like the jquery.carousel plugin is what took the longest.
That aside, my feeling is that you should reconsider using an iframe to load in the carousel. I do know that multiple iframes on a page can slow the page down. And considering the size of the content you are loading inside that iframe, it might explain the delay. You might want to do some research on iframes and consider the order in which iframes are loaded into the DOM.
Your site's loading fine here.
For the Facebook "Like Box", consider using the iframe version.
http://developers.facebook.com/docs/reference/plugins/like-box/
After clicking the "Get Code" button, select "IFRAME". This may remedy your issue.
I suggest you have a look at the chrome developer tools. You can see how long it takes to load each resource (87 request just to load the landing page - wow!), you can profile scripts to see if something takes very/too long and you can even do an audit and let it check several things you can possibly optimize.
For example
merge the javascripts you are loading from the same domain
set the webserver to use gzip to send script/html files compressed
many resources are explicitly set to be not cachable; for example all the product images and the social media pins (preventing that they are loaded over and over again and will speed up things a lot after the they first page load)
merging images like the social media pins and use css sprites
provide different/only the needed css scripts for each site; according to chrome almost 300kb of css rules are unused on the frontpage
You can find out all that stuff usign the Chrome Developer Tools. All you need is Chromium/Google Chrome.
If it is really the facebook script couldn't you just add a slight delay before loading the fb plugin? Like 500 - 1000ms or so after everything else (well most of it) is loaded.
EDIT: The answer drewcode posted is right. It looks like jquery.jcarousel is causing the delay. See here:

Jquery mobile loads correctly in Firefox, but not Chrome or Safari

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.

Categories

Resources