|
A Few HTML tricks I use in this web
site Redirecting to a different web page after pausing to give a message that the page has moved. I used this when I wanted a reference to http://frisinger.net/island/index.html to http://frisinger.net/island/island.html. Click on the first link to see how it works. This is what the page looks like: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Redirecting a search from a smart phone (small screen) to a different web page that is optimized for small screens. The basic idea is to put a lot of stuff on the initial page, http://frisinger.net/m-w-dave/index.html in this case, to draw the search engine omitting must of that on the pages that this redirects to and to list the redirected locations in a file called robots.txt in the home folder so the search engines will not index them. I added a link in the small screen page, http://frisinger.net/m-w-dave/small_screens.html in this case, to permit the user to go to the full site if they wished. I originally had index.html as main main home and had the redirect code there. That works if the person never wishes to see the full site from the small screen but does not permit access to the full screen page from a small screen because you inherently get redirected again. The downside of this method is that it requires you to rename your home page and of course, all the links to that page. On a small web site this is no problem but on a big site is. There is a more elegant way to work this issue but it requires placing cookies on the users computer so was beyond my capability. Click HERE to see how. Note: To get iPhone to download a revised
page rather than just reloading the one in memory you have to completely turn
off the iPhone then back on. This slows debugging. Here is the HTML file, http://frisinger.net/m-w-dave/index.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- See the Keywords, Title, and Description are fully used here but are
omitted in the sites this page redirects to. --> The robots.txt file looks like this: <!--robots.txt file tells search engines to
ignore certain files --> Adding a jump to another spot on a page:
<a name="error-checking">
<a href="#error-checking">clean slate.</a> This jumps to another page at a particular spot, where http://frisinger.net/computer_maintenance/routine-maintenance.html us the page and error-checking is at the spot where you want to land. If the page you are linking to is in the same folder on the web than you can shorten that to: <a href="routine-maintenance.html#error-checking"> The rules are the same as linking to pictures. Background information:
|
|
|