GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Tech Pushing the limits of JavaScript setting the Head elements of the DOM Object? (https://gfy.com/showthread.php?t=1355300)

dcortez 06-05-2022 01:01 PM

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.

blackmonsters 06-05-2022 01:39 PM

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:

machinegunkelly 06-06-2022 12:02 PM

Quote:

Originally Posted by blackmonsters (Post 23008529)
I'd do it server side; not with JS.:2 cents:

100%

What you're trynna do is horribly bad practice, especially for SEO.

k0nr4d 06-06-2022 12:35 PM

Quote:

Originally Posted by machinegunkelly (Post 23008773)
100%

What you're trynna do is horribly bad practice, especially for SEO.

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...

trevesty 06-06-2022 01:56 PM

Quote:

Originally Posted by machinegunkelly (Post 23008773)
100%

What you're trynna do is horribly bad practice, especially for SEO.

:2 cents::2 cents::2 cents:

dcortez 06-06-2022 02:03 PM

Quote:

Originally Posted by k0nr4d (Post 23008780)
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...

You nailed it. That's exactly what I've been doing.

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...

blackmonsters 06-06-2022 06:13 PM

Quote:

Originally Posted by dcortez (Post 23008809)
You nailed it. That's exactly what I've been doing.

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...

Well OK.

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