Can minifying the html of page have a negative effect on seo?
-
This post is deleted! -
Hi,
It is google suggestion to minify html so I don't think it will affect in any negative ways. Google says and I quote
"Minification refers to the process of removing unnecessary or redundant data without affecting how the resource is processed by the browser - e.g. code comments and formatting, removing unused code, using shorter variable and function names, and so on."
so there won't be any issue if you minify as per Google guideline.
https://developers.google.com/speed/docs/insights/MinifyResources#overview
Hope this helps.
Thanks
-
Hi Mike,
You need to look at this 2 ways.
1. From the machine perspective.
From the google bots point of view, comments, white space and formatting etc are redundant, they don't make the content easier to read as its only interested in the code itself that gives it information. The minifying effect simply makes less data to read/download making the site faster. From an SEO point of view this is a advantage.
2. From a developers point of view.
From a developer point if view, having the html legible is important for all the obvious reasons. Minimising makes the code horrific to edit and develop. SEO wise this confers little advantage, as making is this way increases the size of the document.
The solution.
Maintain 2 versions of the files. A development copy which is nicely formatted and easy to develop and a minimised version that you recreate whenever you make changes. There are countless tools that will auto minimise your html, css and javascript quickly and easily for you.If you are using a CMS such as wordpress / magento etc then this is less likely to be something you can address, however, i do believe add-ons and plugins exist that do this for you automatically.