Loading images below the fold? Impact on SEO
-
I got this from my developers. Does anyone know if this will be a SEO issue?
We hope to lazy-load images below the fold where possible, to increase render speed - are you aware of any potential issues with this approach from an SEO point of view?
-
Happy to help!
-
Thanks Tom!
As always, an amazing response.
Best
-
Hi Chris sorry for the late reply absolutely you can do this by using a plug-in cloudfare or PHP code
- https://wordpress.org/plugins/wp-deferred-javascripts/
- https://wordpress.org/plugins/defer-css-addon-for-bwp-minify/
Another plugin that does this solution but providing an administration area to configure it manually is Autoptimize, that allows to define a specific CSS code in a independent way of your theme CSS stylesheet
- http://www.oxhow.com/optimize-defer-javascript-wordpress/
- https://seo-hacker.com/optimizing-site-speed-asynchronous-deferred-javascript/
- http://www.laplacef.com/how-to-defer-parsing-javascript-in-wordpress/
The solution of these problem is removing those render-blocking scripts. But if you remove them, some plugins may not work properly. So, the best solution for the smooth rendering is:
1. Remove them from your website source page.
2. Use a single script, hosted by Google as the alternative.
3. Push down the new script at end of the page ( before “” tag).
Here is how to do it.
Copy the code from the following link and paste at your theme’s function.php file.
function optimize_jquery() { if (!is_admin()) { wp_deregister_script('jquery'); wp_deregister_script('jquery-migrate.min'); wp_deregister_script('comment-reply.min'); $protocol='http:'; if($_SERVER['HTTPS']=='on') { $protocol='https:'; } wp_register_script('jquery', $protocol.'//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js', false, '3.6', true); wp_enqueue_script('jquery'); } } add_action('template_redirect', 'optimize_jquery');
Save the file and you are done! Now recheck the source of any page and you won’t see those two scripts at the head section. Alternatively, you can see the Google hosted JavaScriptscript source at the end of the page.
That’s all! Now the visible section of your page will be rendered smoothly.
Defer Loading JavaScript
Another suggestion from Google Page Speed tool is “Defer JavaScripts”. This problem happens when you use any inline JavaScripts like the scripts for Facebook like box or button, Google plus button, Twitter button etc. If you defer the JavaScript then the scripts are triggered after loading of the entire document.
How to defer JavaScript at WordPress
1. Create a JavaScript file and give the name as defer.js.
2. Place the JavaScripts codes that you want to defer into the defer.js file. For instance, if you want to defer Facebook like box script, paste the following at that file.
(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=326473900710878"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));
3. Save the file and upload at your theme folder.
4. Now, copy the following code and paste at the head section of the source page. Here in WordPress, open header.php file of your theme and paste the code before the closing head tag.
Make sure to put the correct path of defer.js. For example, the source path should be like this:
/wp-content/themes/theme_name/defer.js ______________________________________________________________________________________________
I hope that helps,
Tom
-
happy I could help
-
Thomas,
Can this be implemented on a Wordpress site?
Apologize for hijacking!
-
What a great response! Just what I was looking for. Thank you!
-
lazy loading images is not as good as deferring an image. Because lazy loading images can cause issues can cause JavaScript issues that will not cause problems if you deferred the image instead of lazy loading.
Defer images you will have a easier time the method discussed here does not hurt search engine optimization in fact it will help it because increased load speeds or what people perceive as an increased load speed always helps the end-user.
Here is the best way
https://www.feedthebot.com/pagespeed/defer-images.html
This is where we defer the images without lazy loading
In the scenario of a one page template, there is no reason to do all the things that lazy loading does (observe, monitor and react to a scroll postion).
Why not just defer those images and have them load immediately after the page has loaded?
How to do it
To do this we need to markup our images and add a small and extremely simple javascript. I will show the method I actually use for this site and others. It uses a base 64 image, but do not let that scare you.
The html
The javascript
-
I have looked for information on this in the past and come up empty handed. With page speed Google really pits you against best SEO practices. I think if you follow most of the page speed insights you can severely limit your SEO. How many images are you talking about, how does Google render the page in their fetch as Google?
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
How Does Dynamic Content for a Specific URL Impact SEO?
Example URL: http://www.sja.ca/English/Community-Services/Pages/Therapy Dog Services/default.aspx The above page is generated dynamically depending on what province the visitor visits from. For example, a visitor from BC would see something quite different than a visitor from Nova Scotia; the intent is that the information shown should be relevant to the user of that province. How does this effect SEO? How (or from what location) does Googlebot decide to crawl the page? I have considered a subdirectory for each province, though that comes with its challenges as well. One such challenge is duplicate content when different provinces may have the same information for some pages. Any suggestions for this?
Technical SEO | | ey_sja0 -
SEO implications of network outage
Hi, Our bandwidth provider has informed us of a forthcoming network outage this weekend, the net result being that around 20 websites will be unreachable for a total of about 1 hour inside a predetermined 3 hour window.In an ideal world we would like to provide a holding page or be able to respond with a "503 Service Temporarily Unavailable" HTTP code, however the complete absence of connectivity means we'll be unable to do this.Does anyone have any ideas about the SEO implications of this kind of downtime? It would be useful to know if there are any actions we can take prior to the outage that could mitigate the impact. We've considered repointing the DNS to other servers, but it's only something we'll do if the negative impact of not doing it is too great.Thanks in advance!
Technical SEO | | Dave3920 -
Significance of Page speed to SEO?
I am in the middle of optimizing sites for SEO, and am wondering how big of a factor it is to get page load speed under 1.5 seconds? I am prioritizing tasks and I want to know how much this could affect trafiic? Thanks
Technical SEO | | Zachary_Russell1 -
Domain redirection and seo implications
We have an existing site that is a subdomain but we recently acquired an exact match domain. Will building links to the exact match domain and having the domain point at our existing subdomain work or should we convert the entire site and redirect our existing subdomain to the new domain? What I'm trying to figure out is how to maximize the benefit here and how the existing mass of links pointing to our existing subdomain (shop.domain.com) can be used. New domain: keywordshop.com Existing URL: shop.domain.com
Technical SEO | | CHarkins0 -
How does the FSS jQuery plugin affect SEO?
Looking to create a full screen sliding site for optimum use on tablets. Found this: http://codecanyon.net/item/fss-full-screen-sliding-website-plugin/full_screen_preview/159103 What is the general feeling on using FSS in terms of SEO? Should it be avoided? What's the alternative? Thanks!
Technical SEO | | 9xbmarketing0 -
Code problem and the impact on links
We have a specific URL naming convention for 'city landing pages': .com/Burbank-CA .com/Boston-MA etc. We use this naming convention almost exclisively as the URLs for links. Our website had a code breakdown and all those URLs within that naming convention led to an error message on the website. Will this impact our links?
Technical SEO | | Storitz0 -
Does ViewState affect SEO Rankings
We are redesigning our website and looking at our large data in the viewstate hidden field. Our thoughts are to move to bottom of page but our developers are stating this is an old myth and no resent documentation if it improves our SEO. Does ViewState (big data in hidden fields ) effect SEO in any way? If ViewState (hidden field) is present at the end of HTML document instead of near the start of HTML document then will it increase our ranking in search engines? Does Google or any other engine read the hidden fields? or do they ignore them? Can you point me to some valid documentation to back this up? Feed back is appreciated. Cathy
Technical SEO | | SEO-Team0 -
Does changing nameservers negatively impact SEO?
Had to redirect the nameservers to the hosting account in order for the domain email addresses to work. Since then, search results have dropped from the first page to second and much lower with the same keywords. Does that make sense? Another change was redirecting approx 10 parked domains to the main site, was that a mistake?
Technical SEO | | reeljerc0