{"id":171,"date":"2008-09-22T12:19:00","date_gmt":"2008-09-22T18:19:00","guid":{"rendered":"http:\/\/thepizzy.net\/blog\/?p=171"},"modified":"2010-10-06T10:18:50","modified_gmt":"2010-10-06T16:18:50","slug":"javascript-xhtml-ajaxagain","status":"publish","type":"post","link":"https:\/\/thepizzy.net\/blog\/2008\/09\/javascript-xhtml-ajaxagain\/","title":{"rendered":"JavaScript, XHTML, &#038; AJAX\u00e2\u20ac\u00a6again"},"content":{"rendered":"<p><a href=\"http:\/\/www.wrox.com\/WileyCDA\/WroxTitle\/productCd-0471777781.html\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"670\" data-permalink=\"https:\/\/thepizzy.net\/blog\/2008\/09\/javascript-xhtml-ajaxagain\/prosw1\/\" data-orig-file=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2008\/09\/prosw1.jpg?fit=400%2C508&amp;ssl=1\" data-orig-size=\"400,508\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"WROX Professional AJAX Book Information and Code Download\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2008\/09\/prosw1.jpg?fit=236%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2008\/09\/prosw1.jpg?fit=400%2C508&amp;ssl=1\" class=\"alignleft size-full wp-image-670\" title=\"WROX Professional AJAX Book Information and Code Download\" src=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2008\/09\/prosw1.jpg?resize=154%2C195\" alt=\"Cover image for product 0471777781\" width=\"154\" height=\"195\" srcset=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2008\/09\/prosw1.jpg?w=400&amp;ssl=1 400w, https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2008\/09\/prosw1.jpg?resize=236%2C300&amp;ssl=1 236w, https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2008\/09\/prosw1.jpg?resize=118%2C150&amp;ssl=1 118w\" sizes=\"auto, (max-width: 154px) 100vw, 154px\" \/><\/a>Well, I haven\u00e2\u20ac\u2122t done much that was technically inclined, except for some various coding forays into the world of JavaScript, and XHTML\u00e2\u20ac\u201c consequently it led me back to AJAX and XML-Http-Requests. But I didn\u00e2\u20ac\u2122t bother to post anything about that, since it was work-related, and not website-related\u00e2\u20ac\u00a6kind of.<!--more--><\/p>\n<p>Of course, with any new technology I try to build or incorporate into something bigger, I first test it on my own site, the-spot.net, and then implement it elsewhere as intended.<\/p>\n<p>Most of the work I had learned by reading \u00e2\u20ac\u0153Professional AJAX\u00e2\u20ac\u009d beforehand, and doing the XML-Http-Requests manually, and creating my own classes and such. But this time around, it was much simpler.<\/p>\n<p>We implemented the Lightbox image overlay script, and found that it made use of the <a title=\"Practical Prototype and script.aculo.us\" href=\"http:\/\/www.apress.com\/book\/view\/1590599195\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignright\" src=\"https:\/\/i0.wp.com\/prototypejs.org\/assets\/2008\/8\/11\/9781590599198.gif?resize=125%2C164\" alt=\"\" width=\"125\" height=\"164\" \/><\/a>Prototype.js framework (for handling the asynchronous JavaScript calls) and Script.aculo.us for handling the animation of the overlaid image.<\/p>\n<p>So I took it one step further, and decided to read up on the various ways to make use of these frameworks, and ended up calling all the various modules on the My Spot page of the-spot.net, it does create a problem for SEO-driven development.<\/p>\n<p>If you\u00e2\u20ac\u2122re looking for automatically updating  content on a page that doesn\u00e2\u20ac\u2122t have to change for it to happen, then you cause this code (once you include the prototype.js script in your page):<\/p>\n<p><code>new Ajax.PeriodicalUpdater(\u00e2\u20ac\u02dcproducts\u00e2\u20ac\u2122, \u00e2\u20ac\u02dc\/some_url\u00e2\u20ac\u2122,<br \/>\n{<br \/>\nmethod: \u00e2\u20ac\u02dcget\u00e2\u20ac\u2122,<br \/>\ninsertion: Insertion.Top,<br \/>\nfrequency: 1,<br \/>\ndecay: 2<br \/>\n});<\/code><\/p>\n<p>But while this code does the job to get your content updated automatically, at the given frequency in seconds (multiplied by the decay per each cycle containing unchanged content), the Google crawlers aren\u00e2\u20ac\u2122t going to find it \u00e2\u20ac\u201c because all that is on your page is this:<\/p>\n<p><code>&lt;div id=\u00e2\u20ac\u009dproducts\u00e2\u20ac\u009d&gt;&lt;\/div&gt;<\/code><\/p>\n<p>\u00e2\u20ac\u00a6and that does not have any content in it for the Google crawlers and other search engine bots to read.<\/p>\n<p>I\u00e2\u20ac\u2122m still grappling with how to get content into that box for the crawlers to read, but not my users \u00e2\u20ac\u201c and since my site is php-driven, I should be able to include the normal template includes enclosed in &lt;noscript&gt; tags:<\/p>\n<p><code>&lt;noscript&gt;<br \/>\n&lt;!-- INCLUDE \u00e2\u20ac\u0153modules\/module.html\u00e2\u20ac\u009d --&gt;<br \/>\n&lt;\/noscript&gt;<\/code><\/p>\n<p>\u00e2\u20ac\u00a6in order for my pages to show content for the crawlers, but not my visitors \u00e2\u20ac\u201c unless they have JavaScript turned off, of course. I\u00e2\u20ac\u2122ll give it a shot though, and post more information later. I have to go back and re-edit my pages and templates to make sure they are still compliant with the original template architecture.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, I haven\u00e2\u20ac\u2122t done much that was technically inclined, except for some various coding forays into the world of JavaScript, and XHTML\u00e2\u20ac\u201c consequently it led me back to AJAX and XML-Http-Requests. But I didn\u00e2\u20ac\u2122t bother to post anything about that, since it was work-related, and not website-related\u00e2\u20ac\u00a6kind of.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[25,11,3,9,347,2],"tags":[289,467,214,468,477,473,472,471,474,77,466,469,478,480,481,475,470,479,169,210,476,465],"class_list":["post-171","post","type-post","status-publish","format-standard","hentry","category-programming","category-projects","category-tech","category-the-spot-net","category-the-spot-network","category-updates","tag-ajax","tag-asynchronous-javascript","tag-code","tag-decay","tag-development","tag-div","tag-framework","tag-frameworks","tag-frequency","tag-google","tag-image-overlay","tag-insertion","tag-javascript","tag-lightbox","tag-noscript","tag-periodicalupdater","tag-prototype","tag-seo-driven","tag-technology","tag-url","tag-xhtml","tag-xml-http-requests"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":false,"jetpack_shortlink":"https:\/\/wp.me\/prOO4-2L","jetpack-related-posts":[{"id":65,"url":"https:\/\/thepizzy.net\/blog\/2006\/06\/update-tsnx-site-is-useable-again\/","url_meta":{"origin":171,"position":0},"title":"Update: tsnX \u00e2\u20ac\u201c Site is useable again!","author":"[[Neo]]","date":"June 16, 2006","format":false,"excerpt":"For those just stopping by, the-spot.net is now useable like it was in the past. There are still some updates to the database and site code that I am working on, but everything works as it should for the regular users. I'm currently working on the first theme for the\u2026","rel":"","context":"In &quot;Projects&quot;","block_context":{"text":"Projects","link":"https:\/\/thepizzy.net\/blog\/category\/projects\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2008\/04\/Untitled-2.png?fit=400%2C400&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1518,"url":"https:\/\/thepizzy.net\/blog\/2014\/03\/tsn8-in-the-works\/","url_meta":{"origin":171,"position":1},"title":"tsn8 in the works","author":"[[Neo]]","date":"March 18, 2014","format":false,"excerpt":"Development of tsn8 has begun, with better technology, a new user experience, social media integration, and a planned release of Summer 2014!","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/thepizzy.net\/blog\/category\/tech\/programming\/"},"img":{"alt_text":"tsn logo","src":"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/03\/tsnlogo-featured.png?fit=690%2C405&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/03\/tsnlogo-featured.png?fit=690%2C405&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/03\/tsnlogo-featured.png?fit=690%2C405&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":67,"url":"https:\/\/thepizzy.net\/blog\/2006\/07\/update-tsnx-tsnx-lite-theme-et-al\/","url_meta":{"origin":171,"position":2},"title":"Update: tsnX \u00e2\u20ac\u201c tsnX-lite theme, et al.","author":"[[Neo]]","date":"July 3, 2006","format":false,"excerpt":"So it's time for an update. The tsnX-lite theme is up, and has been since the LAN party. Let me know what you think. It's not all the way finished yet...I'm still working on it, and 4 others based on it. I'm also going to be working on two versions\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/thepizzy.net\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2008\/04\/Untitled-2.png?fit=400%2C400&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":75,"url":"https:\/\/thepizzy.net\/blog\/2007\/01\/a-few-enhancements-worth-mentioning\/","url_meta":{"origin":171,"position":3},"title":"A few enhancements worth mentioning","author":"[[Neo]]","date":"January 23, 2007","format":false,"excerpt":"I've come to the point where I have nothing else to do with my time, but sit here and work on long-standing projects. So with that time, I have done a little bit of tweaking on the-spot.net. I've fixed a couple things on the MySpot page, for one... - It\u2026","rel":"","context":"In &quot;Projects&quot;","block_context":{"text":"Projects","link":"https:\/\/thepizzy.net\/blog\/category\/projects\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2008\/04\/Untitled-2.png?fit=400%2C400&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":17,"url":"https:\/\/thepizzy.net\/blog\/2006\/03\/project-tsnxchat\/","url_meta":{"origin":171,"position":4},"title":"Project: tsnXchat","author":"[[Neo]]","date":"March 1, 2006","format":false,"excerpt":"After using a flooble chatterbox from www.flooble.com, and trying to (unsuccessfully) hack it to get rid of the ads at the bottom, I have resolved to putting my newly developed AJAX skills to the test, to create an open-source version, with no ads. I'll explain how you can make one\u2026","rel":"","context":"In &quot;Projects&quot;","block_context":{"text":"Projects","link":"https:\/\/thepizzy.net\/blog\/category\/projects\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":23,"url":"https:\/\/thepizzy.net\/blog\/2006\/04\/tsnxhere-we-go\/","url_meta":{"origin":171,"position":5},"title":"tsnX&#8230;here we go&#8230;","author":"[[Neo]]","date":"April 4, 2006","format":false,"excerpt":"So the start of tsnX has become necessary sooner than expected. I wouldn't be so distraught if it was during a time when there WAS time to be creating a new site, and that this new site was not time-critical in its creation. Because not only do I now have\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/thepizzy.net\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/posts\/171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/comments?post=171"}],"version-history":[{"count":16,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/posts\/171\/revisions"}],"predecessor-version":[{"id":172,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/posts\/171\/revisions\/172"}],"wp:attachment":[{"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/media?parent=171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/categories?post=171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/tags?post=171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}