Why does yola want our pages to load slower than they have to?

  • 1
  • Question
  • Updated 8 years ago
  • Answered
Yola adds A LOT of unnecessary codes and the less a browser has to read, the faster it'll display the page. Take this excerpt code for example...

<!--

<p align="justify"><font color="#bbff33" size="3">Linguistics is narrowly defined as the scientific approach to the study of <a href="language.php">language</a>, but language can, of course, be approached from a variety of directions, and a number of other intellectual disciplines are relevant to it and influence its study. </font><font color="#bbff33" size="3">Semiotics</font><font color="#bbff33" size="3">, for example, is a related field concerned with the general study of signs and symbols both in language and outside of it. </font><font color="#bbff33" size="3">Literary theorists</font><font color="#bbff33" size="3"> study the use of language in artistic </font><font color="#bbff33" size="3">literature</font><font color="#bbff33" size="3">. Linguistics additionally draws on work from such diverse fields as </font><font color="#bbff33" size="3">psychology</font><font color="#bbff33" size="3">, </font><font color="#bbff33" size="3">speech-language pathology</font><font color="#bbff33" size="3">, </font><font color="#bbff33" size="3">informatics</font><font color="#bbff33" size="3">, </font><font color="#bbff33" size="3">computer science</font><font color="#bbff33" size="3">, </font><font color="#bbff33" size="3"><a href="philosophy.php">philosophy</a></font><font color="#bbff33" size="3">, </font><font color="#bbff33" size="3">biology</font><font color="#bbff33" size="3">, </font><a href="human-anatomy.php"><font size="3">human anatomy</font></a><font color="#bbff33" size="3">, </font><font color="#bbff33" size="3">neuroscience</font><font color="#bbff33" size="3">, </font><font color="#bbff33" size="3">sociology</font><font color="#bbff33" size="3">, </font><font color="#bbff33" size="3"><a href="anthropology.php">anthropology</a></font><font color="#bbff33" size="3">, and </font><font color="#bbff33" size="3">acoustics</font><font color="#bbff33" size="3">.</font></p>

-->

Now... note the...

<!-- <font color="#bbff33" size="3"> -->

it's in there 28... that's right TWENTY-EIGHT times!

It only needs to be there ONCE, at the beginning, with an ending tag at the end.

And I'm surprised Yola's engineers haven't done away with the font tag seeing how it's deprecated and in future release of browsers may be unsupported, therefore messing up anyone's site with these tags that have newer (in the future) browsers.
Photo of Donald

Donald

  • 2991 Posts
  • 37 Reply Likes
  • disappointed at codes

Posted 8 years ago

  • 1
Photo of the_pete

the_pete

  • 65 Posts
  • 16 Reply Likes
Official Response
Hey Donald.

The code our text widget generates is very far from as elegant as it could be. You're right, and as a web standards convert myself, I pains me to see us generate it.

We use a DOM technology called 'contentEditable' to allow users to edit text widgets inline in their site. We feel that this technology provides a richer, easier to use editing experience. Unfortunately it comes at the cost of code quality. The technology is provided by the browser, and isn't directly under our control.

We stand by this trade-off, and here's why.

Code quality is a problem for 3 main reasons

1) It's hard to maintain
2) It might not be forwards compatibile
3) If it's bloated, it results in increased load times.

I believe 2 of these aren't problems in the context of building sites in Yola, and the third isn't as bad as it seems.

1) Editing the code through a rich text interface resolves this issue.
2) Browsers are supporting backwards compatibility through specific rendering modes that switch on doctype. We also test the output of the text widget cross-browser.
3) Although the bloat is noticeable in Yola, compared to a medium sized image, the actual impact to load time is negligible.

To sum up, I don't think you should be too worried, because the practical impact on your site's performance and rendering is very small. And for this sacrifice, you can edit the text of your site inline, in your site, in the Yola Site Builder.

All this being said, there are avenues that we're exploring to improve the code quality of our text widgets, reduce the size of our published sites, make your websites faster and save us money :)

For example, after you've edited your text widget, we could parse it and try and remove unnecessary code, replace deprecated tags and close make
tags
tags. We could also try and override the default behavior of 'contentEditable' to make them better. There are mountains to climb before we can get these things working in a consistent, bug free manner, but we'll keep trying.

Thanks very much for the feedback.

Cheers
Pete

P.S.

Firefox, Chrome and Safari generate the best code using our Text Widget. Not perfect... but they're getting there.