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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-05-2022, 01:01 PM   #1
dcortez
DINO CORTEZ™
 
dcortez's Avatar
 
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.
dcortez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-05-2022, 01:39 PM   #2
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
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.

blackmonsters is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2022, 12:02 PM   #3
machinegunkelly
Confirmed User
 
machinegunkelly's Avatar
 
Join Date: Jun 2003
Posts: 3,194
Quote:
Originally Posted by blackmonsters View Post
I'd do it server side; not with JS.
100%

What you're trynna do is horribly bad practice, especially for SEO.
__________________
dead.
machinegunkelly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2022, 12:35 PM   #4
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,217
Quote:
Originally Posted by machinegunkelly View Post
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...
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2022, 01:56 PM   #5
trevesty
Confirmed User
 
trevesty's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Midwest
Posts: 3,793
Quote:
Originally Posted by machinegunkelly View Post
100%

What you're trynna do is horribly bad practice, especially for SEO.
trevesty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2022, 02:03 PM   #6
dcortez
DINO CORTEZ™
 
dcortez's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
Quote:
Originally Posted by k0nr4d View Post
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...
dcortez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2022, 06:13 PM   #7
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,136
Quote:
Originally Posted by dcortez View Post
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.

__________________
You mad as fuck because you suck.
You have no life.

blackmonsters is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
dom, object, setting, elements, initializing, issues, head, javascript, limits, pushing



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.