Sunday 27 May 2018

Mobile Separate URLs

A common setup would be pages on www.example.com serving desktop users with corresponding pages served on m.example.com for mobile users. Google does not favor any particular URL format as long as they are all accessible for all Googlebot user-agents.

Separate mobile URLs serve different code to desktop and mobile devices (and perhaps even tablets), and on different URLs.

We support two methods to have this annotation: in the HTML of the pages themselves and in sitemaps. For example, suppose that the desktop URL is http://example.com/page-1 and the corresponding mobile URL is http://m.example.com/page-1. The annotations in this example would be as follows.

Annotations in the HTML

On the desktop page (http://www.example.com/page-1), add:

<link rel="alternate" media="only screen and (max-width: 640px)"
 href="http://m.example.com/page-1">
and on the mobile page (http://m.example.com/page-1), the required annotation should be:

<link rel="canonical" href="http://www.example.com/page-1">
This rel="canonical" tag on the mobile URL pointing to the desktop page is required.

Annotations in sitemaps

We support including the rel=”alternate” annotation for the desktop pages in sitemaps like this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>http://www.example.com/page-1/</loc>
<xhtml:link
rel="alternate"
media="only screen and (max-width: 640px)"
href="http://m.example.com/page-1" />
</url>
</urlset>

The required rel="canonical" tag on the mobile URL should still be added to the mobile page’s HTML.

Monday 7 May 2018

How to increase the PageSpeed Insights

  • Optimize images: Reduce image size according to https://gtmetrix.com/
  • Eliminate render-blocking JavaScript and CSS in above-the-fold content: Render means loading, so if something is render-blocking, it means that it is keeping the page from loading as quickly as it could.
Google recommends to remove or defer javascripts that interfere with loading the above the fold content of your webpages.

Above the fold means what a user sees initially on their screen. That screen might be a phone, ipad, desktop or whatever the user is using to see your webpage.

Soluition: Move the CSS & JavaScript to the footer of the website
  • Avoid landing page redirects: Don't avoid landing page redirects when using HSTS. HSTS is an important reason not to bypass redirects: the HSTS preload list requires your site to redirect to https first, then to www or non www. If you want to preload your site on the preload list, don't try to avoid this one extra landing page redirect.
  • Leverage browser caching: Leverage Browser Caching means storing static files of a website in visitor browser. And then retrieving them from browser quickly instead again from server. Actually it uses to speed up each page of a website
Soluition: Need to update code in .htaccess file according to server or using the tool https://wordpress.org/plugins/leverage-browser-caching/
  • Minify JavaScript, Minify CSS: Make your website smaller and faster to load by minifying the JS and CSS code.
Soluition: https://wordpress.org/plugins/autoptimize/
  • Reduce server response time: It is the time taken by the browser to start loading the website. It measures how long it takes to load the necessary HTML to begin rendering the page from your server, subtracting out the network latency between Google and your server. It adds to the total website loading time. In short, server response time (SRT) is the amount of time it takes for the web browser to receive a response.
Soluition: 
  1. Check Your Hosting
  2. Choose Your Web Server Carefully
  3. Optimize Your Web Servers
  4. Reduce Bloat
  5. Optimize Your Database