DEV Community

Sa
Sa

Posted on • Updated on

Flower store app. Part 2. Strangeness out of nowhere

While talks continue about the feasibility of an app for a flower store, I decided to just take a look - what kind of site is proposed to be embodied as an app?
Having run it through all known diagnostic tools, I found one very strange feature: the strange piece of code appears ONLY when checking it through Google's rich-results tester.
Example: look at source of this page - https://saholaflowers.com/. Screenshot of last few lines:

Image description

And now the same page, viewed through Google tools: https://search.google.com/test/rich-results/result?id=foGWPW0ALJ5aOdsWqBcjPw

Image description

Do you see a new piece of code after the closing script tag?

I'll remind you, this is source code - there can't be a dynamically added JS DOM. But this piece of code only appears when viewed through this tool.

This piece of code has the site's old domain, saholany dot com. I have checked the WHOLE site, every file, the entire database - there is not a single mention of this old domain.

I've reset all the cache on the hosting, on the site, on the browser. But this code is still there.

Not only that, if I make changes to the site code (like adding a tag with the class test-tag-for-goole), the tool will see those changes - so it's not a Google cache or some other cached value, no:

Image description

So what is that?

And even more important question, how do you clean this up? This is the first time I've encountered a situation where I can't find the reason for the code appearing on my own site....

To be continued.

Top comments (2)

Collapse
 
sa-hola profile image
Sa

UPD 2024-01-15:
After downloading all the files of the site and the entire database, I did a search for a piece of phrase from this mysterious code. And you know what's most interesting - there is no such piece in the files or in the database!

Collapse
 
sa-hola profile image
Sa

UPDATE 2024-01-15 part 2:

The problem turned out to be not even in the site code, but in the fact that search.google.com/test/rich-results does not show the source code of the page (as in the browser), but passes off the finished DOM as the source code of the page, along with what was created dynamically.
And the mysterious code was added using the tag manager.