Hello,
If I “View Page Source” for our Hubspot webpages I see:
1. 2000+ lines of CSS code. Is this normal for hubspot pages? Isn’t it better if the CSS is read from an external file?
2. Sections that do NOT show up on the actual webpage. Most of them have default content (see example below) but I have also found some that have edited content.
<div class="row-fluid-wrapper row-depth-1 row-number-1 dnd-section dnd_area-row-0-hidden">
<div class="row-fluid ">
<div class="span12 widget-span widget-type-cell dnd-column" style="" data-widget-type="cell" data-x="0" data-w="12">
<div class="row-fluid-wrapper row-depth-1 row-number-2 dnd-row">
<div class="row-fluid ">
<div class="span12 widget-span widget-type-custom_widget dnd-module" style="" data-widget-type="custom_widget" data-x="0" data-w="12">
<div id="hs_cos_wrapper_widget_1723569359668" class="hs_cos_wrapper hs_cos_wrapper_widget hs_cos_wrapper_type_module widget-type-rich_text" style="" data-hs-cos-general-type="widget" data-hs-cos-type="module"><span id="hs_cos_wrapper_widget_1723569359668_" class="hs_cos_wrapper hs_cos_wrapper_widget hs_cos_wrapper_type_rich_text" style="" data-hs-cos-general-type="widget" data-hs-cos-type="rich_text"><h2>Something Powerful</h2>
<h3>Tell The Reader More</h3>
<p>The headline and subheader tells us what you're <a href="#">offering</a>, and the form header closes the deal. Over here you can explain why your offer is so great it's worth filling out a form for.</p>
<p>Remember:</p>
<ul>
<li>Bullets are great</li>
<li>For spelling out <a href="#">benefits</a> and</li>
<li>Turning visitors into leads.</li>
</ul></span></div>
</div><!--end widget-span -->
</div><!--end row-->
</div><!--end row-wrapper -->
</div><!--end widget-span -->
</div><!--end row-->
</div><!--end row-wrapper -->
Where are these coming from? How come they don’t show up in the page GUI? How can I remove them?
Thanks a lot. 
Hi @chris305! I know I looked at my page sources a long time ago, freaked out by the sheer amount of stuff, and then never did that again! 
I don’t know why HubSpot pages are so bloated with CSS. I’m currently in the middle of flipping my website from a custom built Hubspot Theme to one off the Marketplace. Pages in each theme are this way and so it would seem it’s a HubSpot thing and I don’t think there’s much you can do about it. I’ve spent a lot of time in Design Manager, but I am not confident to change too much so I just leave it all alone.
Have you found Design Manager where most of this code lives? If you use the Hubspot search bar to look for desing manager, you can launch it from the Apps and look at all the page, theme and module codes.
Hello Crystal. Thanks for the reply.
I checked Design Manager. Looks a bit too technical so I will follow your lead and not mess with it!
Any idea about the hidden content? (question 2 in the original post).
Cheers
Chris
As to the hidden content, I would assume that the HubSpotters who wrote all this code (someone had to) left clues and information for future HubSpotters who would need to update and maintain the code. Those are just comments from one developer to another.
POV: I like to see comments left in code. It means the creator cared enough to think about the future and others who would look at the code.
These are not comments. They are the placeholder text that comes with new “Rich Text” sections. They look like this:
In my case, the section exists in the page source but not in the actual page. Like a ghost section!
Oh! That part. Sorry. Why that default text shows up in the page source is odd. Especially if you don’t call a Rich Text module in to the page, and especially if you’ve changed the content of a Rich Text module. Again, I’m not sure why Hubspot is choosing to call so much into each page. It’s almost like a “just in case, we’re going to bring in everything.”
Here is that module in Design Manager. Maybe you could simplify it so less is shown. But it will change how new Rich Text modules appear when you call them in the future. I’m not sure I’d mess with it, but as long as you can put it back the way it was originally, I think you’ll be ok to try it.
I investigated a bit more.
These are webpage sections that have been removed from the GUI but somehow remained in the Source Code. I found one that included a link to an old page and was giving a “broken link” validation error.
Currently the only way to remove them is to delete that section and create a fresh one with the same content. This is not exactly a scalable solution.
Looks like Hubspot should tidy up their page-creating GUI.