Current time: 03-05-2021, 11:17 AM Hello There, Guest! (LoginRegister)

Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Occassional "Waiting for response from" lag
12-04-2013, 07:01 AM
Post: #8
RE: Occassional "Waiting for response from" lag
You have JS doing many things after the onload event.

The JS is doing very fugly things. I suspect poorly written JS.

One thing that may or not be an issue is multiple classes on the images. both class="lazyload" class=" wp-post-image"

Looking at more of the <img> tag it appears the image is supposed to be loaded with a JS lazy load.

Because the " wp-post-image" (the first character being a space is not good ) comes after the former "lazyload" the second class my take precedence in most Browsers. It is not easy to say for sure because it is a clear HTML error. I can only guess by thinking what I would do if I was writing the Browser code. Then the space in the second Class could cause issues too. Depends on how well the Browser and JS deal with it.

Here is where things get ugly. Possibly a mistake by the WP Theme programmer.

class="lazyload" data-lazy-src="" class=" wp-post-image"

With the data-lazy-src= it appears to be a misguided attempt to copy jQuery's data- tags. If the two classes are both necessary then they should be combined.

class="lazyload wp-post-image"

In my opinion HTML should not be created by JS. The HTML for this page is essentially blanks to be filled in by JS. That is just WRONG. It is a very common practice, but when you have a mass of the blind leading the blind, it is still WRONG. Altering HTML with data- tags, backed with voluminous CSS files is a jQuery practice that should not be encouraged.

This page is generated by PHP. The PHP should be handling the Dynamic content, NOT JS.

All HTML and CSS for the page to render correctly should be in a static HTML doc or the script (e.g.) PHP shoudl generate all the necessary HTML and CSS.

I can build a prototype of an app in a manner of 2-3 hours. Have a functional working model in a day. At this point to the uninformed it appears the app is 80% complete. Just needs to be cleaned up. The opposite is true. The clean up is more than 80% of the job. This is the point were the programmer wants to move on to a new project rather than do the tedious necessitates of a project they have already become bored with. When the programmer is giving the code, plug-in, theme away for fee they are not going to do the necessary clean-up.

In the Word Press World this is the norm. If you doubt me just run the W3C validator tools on any WP theme demo site.

The part that is often missed is checking that the JS commands used are supported by all Browsers. JS is an imperfect programming environment. Due to the nature of the Browser environment it is not uncommon for Events to not be captured especially when using interval and .timeout commands are used. I assume this page use setTimeout in the onLoad event. In the Browser waterfall you will find activity the WPT does not see. About 250 milliseconds after page load you will see more HTTP activity. More HTTP activity when the page scrolls. All of this HTTP requests are requests made by scripting not the parser. When there is scripting activity when the refresh is clicked undesirable results commonly occur.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Occassional "Waiting for response from" lag - - 12-04-2013 07:01 AM

Forum Jump:

User(s) browsing this thread: 1 Guest(s)