Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 02-02-2017, 05:33 AM
Altssolution's Avatar
Altssolution Altssolution is offline
Contributing Member
 
Join Date: 01-29-17
Location: v7n.com
Posts: 195
iTrader: 0 / 0%
Eliminate render-blocking JavaScript and CSS

how to resolve Eliminate render-blocking JavaScript and CSS error
googl's page-speed tools gives this error

includes/js/jquery/jquery.js?ver=1.12.4
/jquery/jquery-migrate.min.js?ver=1.4.1
/inc/js/modernizr.min.js?ver=4.7.2
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 02-04-2017, 09:56 AM
memodorial's Avatar
memodorial memodorial is offline
Contributing Member
 
Join Date: 10-10-15
Location: Solar System. Planet Earth
Posts: 229
iTrader: 0 / 0%
Quote:
Originally Posted by Altssolution View Post
how to resolve Eliminate render-blocking JavaScript
Render-blocking error is occurred when content from below the fold (that is viewed only when scrolled down) is loaded too early.
Usually each situation requires it's own specific approach. But in general CSS code should be loaded before JS, leading to few possible solutions:
- CSS can be written before JS
- JS have to become async (loaded after everything else had been transferred):
Code:
<!DOCTYPE html> <html> <head> <script async src=/code.js> <!-- If all JS is async than CSS code can be written even after JS-> </head> ...
-Things like jQuery can be loaded on very end, example:
Code:
... </footer> <script src=/jQuery.js> </body> </html>

Last edited by memodorial; 02-04-2017 at 10:11 AM.
 
Reply With Quote
  #3  
Old 02-06-2017, 09:40 AM
Altssolution's Avatar
Altssolution Altssolution is offline
Contributing Member
 
Join Date: 01-29-17
Location: v7n.com
Posts: 195
iTrader: 0 / 0%
Quote:
Originally Posted by memodorial View Post
Render-blocking error is occurred when content from below the fold (that is viewed only when scrolled down) is loaded too early.
Usually each situation requires it's own specific approach. But in general CSS code should be loaded before JS, leading to few possible solutions:
- CSS can be written before JS
- JS have to become async (loaded after everything else had been transferred):
Code:
<!DOCTYPE html> <html> <head> <script async src=/code.js> <!-- If all JS is async than CSS code can be written even after JS-> </head> ...
-Things like jQuery can be loaded on very end, example:
Code:
... </footer> <script src=/jQuery.js> </body> </html>

Thanks for your reply, we are already loading js on footer
how to setup js async, any link you have ?
 
Reply With Quote
  #4  
Old 02-06-2017, 11:25 PM
memodorial's Avatar
memodorial memodorial is offline
Contributing Member
 
Join Date: 10-10-15
Location: Solar System. Planet Earth
Posts: 229
iTrader: 0 / 0%
Quote:
Originally Posted by Altssolution View Post
Thanks for your reply, we are already loading js on footer
how to setup js async, any link you have ?
You work for web development company and don't even know about async JS? Seriously? LOL, let me google it for you:
https://css-tricks.com/thinking-async/
 
Reply With Quote
  #5  
Old 02-08-2017, 11:51 AM
Altssolution's Avatar
Altssolution Altssolution is offline
Contributing Member
 
Join Date: 01-29-17
Location: v7n.com
Posts: 195
iTrader: 0 / 0%
Quote:
Originally Posted by memodorial View Post
You work for web development company and don't even know about async JS? Seriously? LOL, let me google it for you:
https://css-tricks.com/thinking-async/
thanks for your help , i don't think web development is web design
 
Reply With Quote
  #6  
Old 02-08-2017, 01:46 PM
Woomeister's Avatar
Woomeister Woomeister is offline
Contributing Member
 
Join Date: 11-10-16
Location: Gloucestershire
Posts: 1,262
iTrader: 0 / 0%
Quote:
Originally Posted by Altssolution View Post
thanks for your help , i don't think web development is web design
In the real world it is...

look up 'semantics'.
 
Reply With Quote
  #7  
Old 02-09-2017, 03:47 PM
gxnpt's Avatar
gxnpt gxnpt is offline
Contributing Member
 
Join Date: 09-10-16
Location: far west Florida near Destin
Posts: 104
iTrader: 0 / 0%
I might be out of date here, but I did web development (all about how a site works) working with a web designer (all about what a site looks like) when I was freelancing.

In my case web developer and 0 artistic ability go together (also 0 interest in SEO and such, I just like to code) - but I told the front end artsy person what was reasonable to do.

So, design and development is not the same - large companies have both employed. Small design companies subcontract or are themselves subcontractors. Developers usually under contract or freelance if not a regular employee.

By the way, is a matter of make sure the code gets loaded before it gets called. If some part of the page tries to use a function that does not exist yet, there is a problem....in basic terms.

Last edited by gxnpt; 02-09-2017 at 03:58 PM.
 
Reply With Quote
  #8  
Old 02-09-2017, 03:56 PM
Woomeister's Avatar
Woomeister Woomeister is offline
Contributing Member
 
Join Date: 11-10-16
Location: Gloucestershire
Posts: 1,262
iTrader: 0 / 0%
Quote:
Originally Posted by gxnpt View Post
I might be out of date here, but I did web development (all about how a site works) working with a web designer (all about what a site looks like) when I was freelancing.

In my case web developer and 0 artistic ability go together (also 0 interest in SEO and such, I just like to code) - but I told the front end artsy person what was reasonable to do.

So, design and development is not the same - large companies have both employed. Small design companies subcontract or are themselves subcontractors. Developers usually under contract or freelance if not a regular employee.
You are out of date I'm afraid. In the UK web 'development' is all encompassing. Large companies have many jobs that are unnecessary. They have CRO's and SEO's which should be the same people, what use is one without the other?

We do have web designers, but more and more they are realising that they need to be able to do more than make pretty looking sites that don't rank!

I get most of my work from people who wrongly went to web designers who made them a nice looking useless site that has no onsite optimisation.

If you can't design and develop in this day and age you will be fighting over scraps I'm afraid.
 
Reply With Quote
  #9  
Old 02-09-2017, 04:09 PM
gxnpt's Avatar
gxnpt gxnpt is offline
Contributing Member
 
Join Date: 09-10-16
Location: far west Florida near Destin
Posts: 104
iTrader: 0 / 0%
Since I am retired and only do anything on the basis of it's fun, that is not an issue.

However, using an analogy from another industry, while an automobile manufacturer may need both finishing and under the hood capabilities, mods to those (specialty painting and mechanical alterations for beyond factory specs performance) might rely on individualized talents and be small businesses that may refer clients between them.

Then again, those might be the scraps you are referring to.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove Render-Blocking JavaScript ankit009 SEO Forum 0 01-28-2015 07:06 AM
Javascript to Render HTML based on Browser Version? Guerino1 Coding Forum 3 07-03-2013 11:52 PM
Google’s Cutts Talks About Blocking JavaScript snakeair Google Forum 0 03-26-2013 09:41 PM
Google: Blocking Javascript, CSS May Be Hurting Your Rankings snakeair Google Forum 0 03-27-2012 07:52 AM
Help me eliminate a rollover with CSS Rick Web Design Lobby 8 10-19-2003 07:12 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 05:40 AM.
Powered by vBulletin
Copyright © 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC