[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

IF JS needs to go, why not the CSS too?

Posted on 2006-04-13
4
Medium Priority
?
270 Views
Last Modified: 2010-04-27
Many search engine optimization specialists say to kill all the Javascript code at the top of the page, and put it at the bottom - it helps search engines index the pages (I am not thoroughly convinced of this, but .. )

So on most of my pages, the CSS is actually LONGER than the JS routines.  If we are trying to "pamper" the search engines so they wont get bent out of shape, how about all that voluminous CSS?  Should it be moved to the end of the document, or does it all have to be included in an include file, which is a pain to edit in a separate file?  If it goes at the end, how can this be done, it is supposed to be at the beginning?

How much do you have to pamper search engines, with CSS and JS?
0
Comment
Question by:scrathcyboy
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
sitecreations earned 1000 total points
ID: 16450547
Why do you feel it's difficult to manage sep. CSS JS files?   I find it far more convenient to hold them outside in their own areas than to try to worry about where the CSS is in a project.  It also reduces site publishing time, and improves site performance depending on how the server caching is set up.

My rule is 70k, but others say 100k.   If your page is >100k, you've got problems with some SE spiders skipping parts of your content.  I always put Javascript in .js files unless I have one very specific function for that file (such as a form validatation that is unique to a certain form, etc.)   CSS is usually more generic and applicable to more than one page.

I think it will pay great dividends for you to begin putting your CSS definitions in different files and coming up with a naming convention to make referring to said CSS easy.  This way you not only reduce the work involved in managing CSS, but you are probably going to make it a little easier on the spiders.

In SEO, of course, there aren't too many improvements that are "home runs"... everything is incremental.  So count this as one of them.  A little improvement that you can add to the others.

Best of luck,

Sc
0
 
LVL 44

Author Comment

by:scrathcyboy
ID: 16450791
Problem I have is in uploading, sure I can edit CSS and JS file separate, but then I have to manually add each one to the upload sequence, it is royal pain in the neck.  But as you say, if it is worth it, then it is worth it, period.  For first time ever, my index.html on latest site is 101K, biggest size I have ever done.

But I find the amalgamation of CSS styles is impossible without having one monster CSS.  Each site I do its 100% different from last, all custom tailored to the "feel" and theme of the site.  One CSS is impossible.

BTW< yours is very good contribution, hits at heart of issue.  Tell me how important it is to get rid of CSS data at front, for search engine ease of indexing?
0
 
LVL 5

Assisted Solution

by:sitecreations
sitecreations earned 1000 total points
ID: 16450858
The tools I use notice the dependency on the external CSS, and if it's changed, upload it without any added work from me, so it's not an issue.  It's not an all or nothing thing ... I usually have 3-4 CSS files for large sites.  The CSS link-in (and .JS) sequence will be from generic to specific at the top.  It's a style thing, though.  We all have our own method.  Mine comes from the old days of C/C++ include directives when I used to write lots of code.

btw, here are the estimated will-index sizes for major engines

MSN 150k
Google 101K
Yahoo 240K appx
Ask 101K appx



0
 
LVL 44

Author Comment

by:scrathcyboy
ID: 16450895
Well I bit bullet and did what you said, now index page is 97K, will be 100K with meta tags.  I think you have answered the question, and as promised in my previous one, I will up points and thank you for your help in forcing me to get these two big baggages into separate files.  On big sites, I will do it in the future.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read this article and get to know some best tips for outsourcing client PPC work to a white label PPC agency.
There is a massive demand for content on the web right now, and it doesn't look like it's going to stop any time soon. But, if you are running a business blog, it's not just enough to offer your audience lots of content. It needs to be high-quality…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Suggested Courses
Course of the Month17 days, 23 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question