![]() |
Pushing the limits of JavaScript setting the Head elements of the DOM Object?
Until now, I have not had any issues with initializing my DOM Object with JS - even setting elements like <TITLE> and <meta charset=... with JS Writelns in the HEAD before rendering is complete.
BUT, some bots like Bingbot, and some browsers like Opera, throw exceptions and errors, claiming that those elements have not been defined. Google, which is amazing at rendering even the most complex JS-based scripts, never complains about missing <TITLE> or <meta charset...> I got tired of having Bingbot whine about no <TITLE>, so I actually added the good old fashion <TITLE> in the HEAD. Before I go and add explicit (redundant) plain text elements to my HTML, I'm curious about where everyone else sits on this issue? Am I pushing JS too far by initializing the DOM with some elements, or are the complaining browsers and bots not "smart enough". Either way, it's an issue that, if I want Bingbot to understand my site, I may have to put a handicapped lane in just for it. Anyone dealing with Bingbot and values case sensitivity, will already know that Bingbot sees all URLs in lower case - even if your sitemaps and HREFS explicitly declare URLS in mixed case. This is a whole other problem. I have mostly worked with Linux servers, and using mixed case in not unusual. Back to the main question, does anyone else here avoid setting certain DOM objects with JS because of some bots/agents not being able to "see" them? Thanks. |
Just seems like your are doing things the hard way to me.
That's all the stuff I want figured out before I serve the page, so I'd do it server side; not with JS. :2 cents: |
Quote:
What you're trynna do is horribly bad practice, especially for SEO. |
Quote:
|
Quote:
|
Quote:
I prototyped my platform this way, but I can always shift back more load to the server, if that made sense. Google has no problem rendering and spidering any of my code built entirely from JS. There may be issues of payload optimization (lots of small pieces vs fewer larger pieces), but the flexibility, specially for designing and testing, with micro-includes can't be beat. When things settle enough, I may write a program to generate and maintain my entire website. The added plus of not using PHP (sessions), is that my entire website is cookie-free. It's a work in progress... |
Quote:
Good luck wasting time with shit that's already solved. :1orglaugh |
All times are GMT -7. The time now is 09:04 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123