Externalize your Javascripts and CSS
Now you may be wondering just exactly why you would want to externalize your CSS and Javascripts? Ever heard the term SEO? If you have a website I’ll bet you have. If you have a website and you haven’t heard of SEO then “WHERE THE HECK YOU BEEN?” I’m fairly certain even the newest webmasters know what SEO is and how important it is today.
SEO stands for Search Engine Optimization, which means to make your website as close as you can to perfect when seen through the eyes of a search engine searchbot. One way to help yourself in this area is to make sure your actual content (text) is as close to the top of the page as possible. When I say “as close to the top” I mean when you are viewing the “SOURCE CODE”, where you can see all your html tags. This is what the searchbots, or spiders, see when they crawl your site.
What you need to understand is that they don’t crawl your entire site everytime they visit. They take little bites here and there to determine overall relevancy. If you have alot of meta tags, javascripts, and a laundry list of css above your <body> tag then it will most definitely take longer for your content to get added to the search engine results.
So to help yourself out you should move all of your javascripts and css to external files that will be called up as your page loads. This will move your <body> (content,text) up higher on the page as far as the searchbots are concerned. O.K. are you ready? Take a breath and relax…just kidding! This is a breeze, really. Here we go…
Externalize Javascripts…
Locate the script you want to move and copy all the text that is between <script> and </script> (do NOT include these tags) then paste them into notepad. Save this file as “yourfilename.js” REMEMBER THE .js
Now upload that file to your sites directory and on your website you’ll want to place this code in it’s place (place these just before the </body> tag if you can). <script language=”javascript” type=”text/javascript”
src=”yourfilename.js”></script> THAT’S IT FOR JAVA ON TO CSS
Externalize CSS…
This is even easier and will save you alot of time if you want to make changes to the whole site. Simply edit your external css file and every page that calls on that file will immediately be changed. Start by copying everything INCLUDING the <style></style> tags. Make sure you get it all.
Paste it into notepad and save the file as “yourfilename.css” (note the .css). Upload the file to your site’s directory. In it’s place (on your website) place this code <link rel=”stylesheet” href=”yourfilename.css” type=”text/css”>
Congratulations you just gave yourself the opportunity to improve your pagerank, make fast changes to your entire site, call on java from multiple pages, and this will allow your pages to load faster in browsers. Two simple things you can accomplish fast that will benefit your site forever.
Thanx for your time and remember…Always strive to improve and success will follow.
David Knops
DKWebsites LLC
Contact Us for more informations. Want a FREE No Obligation Price Quote? |
« Cloaking Search Engine Why? | Home | Landing Page Optimization »
Comments are closed.