In the Document Setup dialog, there is an option on the Output tab
that lets you shift the CSS to an external file. Note that this will
move all the text definitions used in your site into a common file. It
will not move the layout specs for individual page elements, so there
will still be some inline CSS in your page. But that big lump of code
at the very top of the page will be gone, which is nice.
Your friend is correct in once sense, but he’s definitely counting
angels on pinheads when he’s doing so. If you have a site that shares
an enormous amount of common layout code (a highly templated site,
say) then it makes a lot of sense to move as much of that into a
single file which can be cached by the browser, as this speeds up
subsequent page views.
Freeway is designed to make individual pages, each completely unique,
and so it uses inline CSS for the individual page elements. On a
highly-repetitive site, this does contribute to a very slight bloat on
those individual pages, but it’s a trade-off, like most things are.
In my experience, there are two types of “strict” Web developers.
There are those who are strict because it makes their work easier and
more predictable, and there are those who check it off a list as
something you MUST have, without thinking the whole thing through to
its logical conclusion. I’m not pointing fingers here, and I’m
definitely not changing the subject. If your goal is to complete the
checklist, then Freeway is the wrong tool for the job as it currently
stands.
You can point your friend to the W3C validator, where your page will
validate nicely. You can also point your friend to the Yslow plugin
for Firefox, which will knock the site for not having all of its CSS
and JavaScript externalized, but will give it good marks for overall
speed.
sidebar: Long ago, there was an early Web application called
WebGarage, which would slurp down whatever page you pointed it to, and
perform some performance evaluations on it (mostly based on file size
overall). In those days, it was common for a Freeway-generated site to
be in the very high 90th percentiles, like 97 or 98 for overall
efficiency. By contrast, hand-coded sites rarely climbed above 80, and
GoLive (remember that?) would be in the weeds around 60.
It’s really a matter of which goal you are aiming for – the technical
merit of having every checkbox filled on your chart, or the very human
merit of having an easier and more productive time of developing. In
the end, networks get faster and computers get more powerful every
single day. Try as we might, we are not going to choke the tubes of
the interweb anytime soon. Just as premature optimization is the root
of all evil, so too is optimizing the wrong thing. When Otto Daimler
and friends set out to make the car, they did not after all improve on
the horse.
Walter
On Jul 19, 2010, at 8:42 AM, richie hume wrote:
hi, connected to this I showed a friend who is a professional, he
thought the code wasn’t good, as the CSS is better in its own doc.
is this something I can do or are there any quick fixes which would
make it better? cheers
offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options