Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
06-05-2022, 01:01 PM | #1 |
DINO CORTEZ™
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
|
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. |
06-05-2022, 01:39 PM | #2 |
Making PHP work
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,136
|
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.
__________________
You mad as fuck because you suck. You have no life. |
06-06-2022, 12:35 PM | #4 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,217
|
He's trying to push the work on the client instead of the server. It makes sense from an optimization point of view but server power is just so cheap now...
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
06-06-2022, 01:56 PM | #5 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Midwest
Posts: 3,793
|
|
06-06-2022, 02:03 PM | #6 | |
DINO CORTEZ™
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
|
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... |
|
06-06-2022, 06:13 PM | #7 | |
Making PHP work
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,136
|
Quote:
Good luck wasting time with shit that's already solved.
__________________
You mad as fuck because you suck. You have no life. |
|