Slashdot Mirror


CDN Optimizing HTML On the Fly

Caerdwyn writes "Cotendo, which is a content distribution network, has taken to altering HTML as it passes through their CDN to optimize web pages for faster rendering. This is essentially a repackaging of the Apache mod mod_pagespeed (from Google), with the critical difference being that the rewriting of HTML occurs inline rather than at the web server. We all know that well-written HTML can result in much better rendering of whatever your content is; the questions are 'Will this automatic rewriting cause other problems, i.e. browser quirks?' and 'Assuming that only the web pages of Cotendo's customers are altered, are there nonetheless potential legal troubles with someone rewriting HTML before delivery to a browser?'"

18 of 121 comments (clear)

  1. My content how it was intended by Pikoro · · Score: 2, Interesting

    If I write a web page, however much it sucks, that's exactly how it should be delivered.

    If I see a bad website that takes 20 minutes to load, then I will never buy anything from that site or it's company. If they can't hire a decent web programmer, they don't deserve my money.

    However, if you change the page to make it render faster, the ISP is lying FOR the shitty company and their shitty website by making it appear to be a well crafted site.

    tl;dr: Leave the shit shitty. It'll put bad programmers out of business which we need.

    --
    "Freedom in the USA is not the ability to do what you want. It is the ability to stop others from doing what THEY want"
  2. Too much work by FranTaylor · · Score: 3, Insightful

    Instead of doing it over and over again on the fly, why not just do it once and shoot the "fixed" html back to the authors, and firmly insist that they update their pages? This seems like a much better way to accomplish the same thing.

    1. Re:Too much work by KiloByte · · Score: 3, Insightful

      Also, most HTML these days is generated rather than static, even if just to have common parts as includes rather than multiple copies.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    2. Re:Too much work by Toy+G · · Score: 2, Informative

      CDN customers are likely to be large customers, and large customers don't have Web developers per se, except maybe one or two to address hotspots.

      The rest of the time they are using a CMS, and all of the major CMSs have some ... sub-optimal code.

      This. Newspapers are notorious for crappy sites, implemented 10+ years ago on top of expensive proprietary tools based on the use of table elements and "liberal" abuse of SGML properties. Even the much-admired BBC site is kept together by a hodgepodge of 15-year-old code, which is known to inflict brain damage after webdevs are repeatedly exposed to it.
      These are big CDN customers, and they will jump on any opportunity to optimize without rewriting their legacy systems.

      It's inevitable in code written by volunteers around the world with no real central co-ordination and decision making, and it's much better than not having free-as-in-beer CMSs at all.

      Bollocks. CMSes built by OSS communities in the last 10 years (e.g. Wordpress) are invariably much, MUCH better at generating html than 99% of proprietary solutions.

      --
      -- Let's go Viridian.
  3. Legal troubles? by cerberusss · · Score: 4, Interesting

    the questions are 'Will this automatic rewriting cause other problems, i.e. browser quirks?' and 'Assuming that only the web pages of Cotendo's customers are altered, are there nonetheless potential legal troubles with someone rewriting HTML before delivery to a browser?'

    I couldn't give a rat's ass about legal troubles. Slashdot is still a tech forum, right?

    There are LOADS of much more interesting questions to ponder, such as: what is exactly the speed improvement? And does it work for Javascript and CSS too? And wouldn't it be much better to work on images instead? Or is that too computationally intensive? What kind of algorithm do they use? In what language is it implemented? Et cetera. Legal troubles shmegal smougles.

    --
    8 of 13 people found this answer helpful. Did you?
    1. Re:Legal troubles? by ThatGuyJon · · Score: 5, Informative

      https://code.google.com/speed/page-speed/docs/rules_intro.html

      I think this link answers all your questions.
      After a quick first glance, it seems like it isn't doing anything that a good web designer shouldn't have already have done. Then again, the percentage of well-designed pages out there mean this could still provide a speedup...

      --
      I must be new here...
    2. Re:Legal troubles? by Pharmboy · · Score: 2, Funny

      My first thought was "why not write good code to start with?" This is like worrying about a new liposuction method, when instead you should get off your fat ass and drop that Snickers bar. It is solving the symptoms, not the problem.

      --
      Tequila: It's not just for breakfast anymore!
    3. Re:Legal troubles? by grcumb · · Score: 3, Insightful

      After a quick first glance, it seems like it isn't doing anything that a good web designer shouldn't have already have done. Then again, the percentage of well-designed pages out there mean this could still provide a speedup...

      And then, you might find yourself in my position. I administer a website with over 100,000 static files, created using a variety of tools over the course of the last 8 years. And one of those tools was FrontPage.

      Given the size of our shop, coupled with the need to handle new content coming in, the best I can realistically hope for is that the formatting of our new content doesn't suck quite as tremendously as the older stuff. On top of everything else, we provide important legal content to one of the most Internet-deprived regions in the world. Bandwidth around here is often measured in single-digit kilobytes.

      ... You can bet your boots I'm going to give this module a test-drive. I'd be crazy not to.

      --
      Crumb's Corollary: Never bring a knife to a bun fight.
    4. Re:Legal troubles? by jimicus · · Score: 2, Insightful

      That's not an answer to his question. He asked why not start with tight and efficient code?

      Fair point.

      I think the last time I saw anything tight and efficient was back when the nature of the computer it was running on forced that. IME, code efficiency is inversely proportional to the power of the system on which it is expected to run.

  4. There are no legal issues by chrb · · Score: 4, Insightful

    If you voluntarily upload your web site to a CDN that tells you it is going to optimise your code, what legal issues could there be? The arrangement is entirely mutually consensual. If you don't want your site optimised, then don't use that CDN.

  5. Oh please by gaspyy · · Score: 4, Insightful

    This seems like an ad for Contendo disguised as an inflammatory post.

    Any webmaster worth their salt is using a variety of tools to improve loading speed - minification of html/css/js, combining scripts, CSS optimization, js packing, compressing PNGs with better tools and using CSS sprites.

    I use W3 Total Cache for two of my blogs and the speed increase is substantial.

    While we are at it, I wish developers would think it through before using JQuery for trivial stuff. Loading JQuery + bunch of plugins to do simple (and I mean simple) fades or form validations is pointless. Here's an example of what I mean.

    So if they're doing this transparently, it's all th better.

    1. Re:Oh please by SavedLinuXgeeK · · Score: 3, Insightful

      Isn't that the point of using Google's copy of jQuery for your sight, in lieu of hosting it yourself. You can share the cache with any other site that is pulling the jQuery lib from a trusted 3rd party. After looking at the link you posted, that code may be simpler with respect to size, but in terms of maintenance or having a novice manage it (without introducing cross platform issues), it seems like it may be a nightmare. What would be nice, and Adobe has done this for flash, is to have a separate cache for trusted libraries. It would be nice if I could query to see if jQuery were available in a browser lib cache, and use it from there if available.

      --
      je suis parce que j'aime
  6. No legal trouble by stephanruby · · Score: 3, Informative

    'Assuming that only the web pages of Cotendo's customers are altered, are there nonetheless potential legal troubles with someone rewriting HTML before delivery to a browser?'"

    Why should there be? They're not selling bandwidth. They're selling an optimization service (at least, according to their press release, that's what they're selling). This seems to be a clear opt-in situation for their customers. Also, their customers are the ones who are going to be saving money because of this, probably not Cotendo.

  7. But what of the crypto possibilities? by Zawash · · Score: 2, Insightful

    Just think of all the possibilities with steganography in poorly written html?
    vs
    and /> tags, empty span and font tags, the number of  's - casing in css styling and everything!

    Just look to North Korea!

    --
    File not found. Fake it(Y/N)? _
  8. Re:Legal precedent by rumith · · Score: 2, Interesting

    I think you missed the point in your rush to object. What's the legal difference (IANAL) between optimizing HTML and inserting ads? In both cases X leaves the source, Y arrives at the destination. Opera does something like this for their Opera Mini browser: the content that is delivered to the browser isn't even HTML, it's some proprietary format, although the browser usually correctly renders it to what the HTML would look like. However, in case of Opera Mini, I explicitly agree to such manipulations and to accompanying technical solutions.
    Once again, this may be a good move on Cotendo's part that will lower their costs and improve end user experience, but it is a dangerous one, because if ISPs and CDNs automatically receive the right to manipulate transmitted content however they please, it will certainly lead to abuse in some cases.

  9. Re:Legal precedent by totally+bogus+dude · · Score: 5, Insightful

    What's the difference between me configuring my servers to optimize our sites on our front-end proxies, and having our CDN doing it on their front-end proxies?

    I think you missed that this is a service Cotendo provides to its paying customers.

    Now, if Cotendo was doing this without their customers' permission, then your objection might have some kind of relevance. I can't find anything to indicate that this is the case though, and it seems like a dumb and stupid business move if it is.

    The new Page Speed service offered by Cotendo will be part of its proprietary new performance application platform Cloudlet(TM), which is able to execute both open source and any proprietary code. Cotendo's new platform is in production with select customers and partners, which will be announced soon.

    This makes it sound like it may actually be optimising the output from applications running on their own servers, rather than as a proxy altering content sent from the customer's servers.

  10. Re:Legal precedent by WrongSizeGlass · · Score: 3, Interesting

    Though I agree with your point, what about the other side of the coin: CDN's service removing content from a page being delivered such as an infection? Could this be used to strip those nasty javascript code injections or Flash-based shenanigans from an infected site 'on the fly'? Removing infections would be as 'good' as inserting ads, toolbars, etc is 'bad'.

  11. Re:Legal precedent by psmears · · Score: 3, Insightful

    If I were a content provider whose HTML was being modified in-flight, I'd invoke a law that already exists for that sort of thing - it's called copyright. My customer requested information from me; I provided it, and as such it is automatically copyrighted. Any modification in transit without authorization is illegal already, IMHO.

    The article is about a content distribution network. That means that the content provider is paying them to make sure that their content reaches the customers quickly.

    If the content provider doesn't like the content being modified, they should just ask their CDN provider to stop doing it - and if they won't, then just use another one! No need for legal action here :-)