|
|
- Two Easy Ways To Optimize Your JavaScript
- Your Technical Questions - Answered
Those subscribers who have been with us for a while will remember that I mentioned our plans as a family to leave the (sometimes) grey shores of the UK and head for the lighter brighter climes of NZ.
Just as a quick update, it's a long process and we're still here - but our intention to get 'over there' as soon as we can is undiminished.
In fact, we can hardly wait.
We're hoping to put the house on the market within the next month or so, and from there get the visa and do some travelling, keeping the business going on the 'open road' (now there's a challenge!).
There's some changes afoot on the business side too.
In response to the valuable feedback we received from the special May issue of The Takanomi Newsletter, we're going to focus in the future on the technology behind e-marketing.
If you think about it, what's e-marketing all about? Basically, marketing that is channelled through one of the most fantastic technologies in current existence, the Internet.
This is not about turning everyone into programmers, but about making you aware of technological issues, solutions and a whole range of possibilities that can have a significant impact on your e-marketing. This is stuff you need to know about, that your techs aren't going to tell you (probably because they don't know either).
If you hire techs to do your programming, web design, etc. for you, I'm sure they'll be skilled in the technologies they use - but it doesn't always mean they'll think about the marketing impact of what they do, or make allowances for your marketing needs.
I've worked with a lot of programmers and other techs, and the vast majority didn't have the slightest clue about marketing on the Internet - sure they could write HTML, clever JavaScript, and funky server-side code. But start talking marketing-speak, and they don't want to know. They just want to write the code, damn it!
Of course they'll be exceptions - I just haven't met them yet.
If you take care of all or most of the technical side yourself, this is all stuff you definitely need to know about.
We start today with an article that shows you two easy ways to optimize the JavaScript on your web site for better search engine positioning, faster load times, and easier script maintenance. If you're not doing this now, you're losing valuable visitors and sales.
We'll also be devoting a section of the newsletter to your technical questions - in each issue, I'll pick a few questions out of my mailbag and answer them directly. If you have any questions on anything to do with the technical side of effective e-marketing, please send them direct to steve@takanomi.com with the subject line 'TechieQuestion', and your question might be picked for publication in a future issue, together with your name and web site address.
The survey in the last issue also indicated that the majority of you would prefer a more regular edition of The Takanomi Newsletter. We're looking at the possibilities for this and you'll certainly be the first to know of any changes to our schedule.
Many web sites, even those owned by people we all think of as gurus in the Internet marketing business, have large blocks of JavaScript code at the top of their web pages, sometimes running to dozens of lines of code.
But did you know that this common practice can have a negative effect on your search engine listings, by pushing your major keywords down the page?
In terms of search engine ranking, it's generally accepted that the higher your keywords are on the page, the better.
This easy-to-follow article will give you two easy ways to make the JavaScript on your web site more search engine friendly, improve your search engine position, and give your traffic levels a nice boost.
1. Move the script to the bottom of the page
This is the easiest method. A lot of JavaScript code can be moved to just above the closing body tag on your web page, without affecting the functionality of your web site.
The best way to do this is simply to test it out and see if it works - if you don't experience any adverse effects and your site appears to continue to perform normally, stick with it.
Your keywords will suddenly be much higher up the page, and your site may even load quicker too with all the code at the bottom.
If you wish, you can also combine this method with the second method as described below.
2. Externalize the script into a .js file
This method has the added advantage that the external .js file containing your JavaScript is often cached in your web visitor's browser, meaning that on subsequent visits your web page will load faster.
It also means you can have the same code on a number of different pages, yet only have a single file to modify and maintain when you want to adjust the script.
Here's how you do it:
- Your JavaScript will look something like the following:
<script language=JavaScript>
<!--
your script here - copy this bit into a .js file
//-->
</script>
Ignoring the opening and closing script tags, and the comment tags if you have them, copy the code in the middle into a brand new plain text file - for example, paste the code into a plain text editor like Notepad (don't be tempted to use something like MS Word).
- Save this file with a .js extension, for example, 'mycode.js', and upload this page to your server to the same directory as the web page.
- To make your web page reference this new .js file, replace the existing JavaScript as shown in the example above, with a single line in the following format:
<script language=JavaScript src=mycode.js></script>
Just replace 'mycode.js' with the name of your own .js file.
- Upload your modified web page to your server and test.
And there you have it - a smaller page, improved keyword positioning, quicker load times for your visitors, and easier script maintenance.
As stated above, both these methods can easily be combined if you wish, too.
| PopUpMaster Pro generates JavaScript that you can place at the very bottom of your web page, ensuring virtually no impact on your search engine listings. Every other popup generator I've come across requires you to place the code in your header tags, thus pushing your keywords further down the page. |
| 2. Your Technical Questions - Answered | ^Top |
Q. I'm working on a site built in php with mySQL that requires passwords. How can we create a feature so that the user can choose to have their login ID and password stored in a cookie? This way they don't need to login everytime they visit the site.
Bruce Namerow, http://www.interactive-strategies.com
A. With PHP, cookies for this purpose are fairly simple to implement on your web site. While a full solution to this would take up too much room here, here's some information that will certainly help.
For those who are not aware, 'cookies' are small packets of information held on the visitor's computer that can be set and subsequently used by individual web sites.
For example, on your web site you might wish to set the name of the visitor into a cookie after they fill in an opt-in form. Then you can use the information in the cookie to address the visitor by name when they return to your site - that would certainly get their attention, and can be used to effectively boost response rates on your web site.
Cookies in PHP are set using PHP code like the following:
setcookie("cookie_name",$value,time()+60*60*24*3650);
Change 'cookie_name' to what you want the cookie to be called, and the variable '$value' will hold the value that you want the cookie to hold.
Then, to access the cookie in your PHP script, you just need to call the variable $cookie_name (or whatever you have called the cookie, preceded by a $ symbol).
This kind of scripting can get fairly complicated - if you've got a strong coffee to hand and really want to understand the meat of the matter in dealing with PHP login scripts, there's an article available here that might help.
Recommendation: If you want a simpler deal, I've been checking out Frank Garon and Lee Benson's Hypnotic Blueprint - the next CD they're sending out includes video tutorials on how to set up membership sites from the ground up (and a lot more besides), so that would definitely be worth a look too. And the regular free consultation sessions with Frank and Lee are invaluable.
Q. How do I create, and send, 'nice' HTML newsletters containing colors, images and so on?
A. An HTML newsletter can be created in the same basic way that you create a normal web page, there are just a few things to remember:
- Size DOES matter - be minimal in your use of graphics, and keep the text fairly short, to ensure the mail can be opened quickly and doesn't take too long for the user to download.
- Use links carefully - links to web pages should always be absolute, eg. 'http://www.example.com/example.html', rather than relative such as just 'example.html' as they may be on your web site; and ensure they always open in a new browser window by adding 'target=_blank' to the HTML link code
- Don't use frames
- Avoid using background images in the 'body' tag - these won't be recognized by many email clients
- Keep it professional - a professional appearance is essential, so be sure to send it to yourself prior to sending it to your subscribers to ensure it appears exactly as you intend
The more important question on this though is often 'how do I send an HTML newsletter'.
You can do this either via an autoresponder-type service, or via some special software on your own PC.
Recommendation: The service we use and recommend is ProAutoResponder - alternatively, if you want to use some software on your own PC, then check out Corey Rudl's Mailloop.
Wanted! Your Technical Questions: If you have any technical issues, please send your questions direct to steve@takanomi.com with the subject line 'TechieQuestion', and I may pick your question to answer in the next issue, or even as the subject of a future article. We reserve the right to edit your question, and by sending us your question you give us permission to publish your name and web site address with the question.
If you have any comments you want to send my way, please feel free, it's always great to hear from you.
And thank you for your participation and continued readership.
Kind regards
Steve Shaw
The Takanomi Newsletter - The Technology Behind E-Marketing
PopUpMaster Pro - PopUp Generator
ClickBank Toolkit
Instant Viral Marketing Program
takanomi.com
6 Gormire Avenue, Huntington, York
YO31 9JB, United Kingdom
|