开发者

Too many hidden divs or spans does it create any SEO impact or Performance issues

So many times I use hidden divs or hidden spans to store some server side variables or generate them while开发者_如何学运维 server code exectutes.

When the user is performing some action I get the div to show.

Is it a good practice. I want to know if this can create any SEO impact.

I want to know if there is any other way without using hidden divs or hidden spans

Thanks in advance.


"So many times I use hidden divs or hidden spans to store some server side variables or generate them while server code exectutes."

I'm not sure exactly what you mean, but that can be a VERY bad practice in terms of security. You don't want your visitors to know anything that's not on the page. Printing arrays or other sensitive server data is a VERY bad idea. Always develop with the idea in mind that there is someone right now looking at your website with the intent to take control over your server or website. Don't throw them bones.

If you use this information for debugging, then use an if statement to determine if it's you, then only show relevant information then and then only.

Example in PHP:

<?php
$ip = $_SERVER["REMOTE_ADDR"];
// replace xx.yy.zz.pp with your IP address
if ($ip == "xx.yy.zz.pp") {
// echo your sensitive details here
}

This way, it'll only return the data to you, and not everyone else.

In terms of SEO, if it's hidden, it's ignored AFAIK. It doesn't help nor hurt your SEO. In terms of client-side performance, well, that just depends on how many you use. If you use 10 million, I'm sure there'd be evident delay in rendering (that'd be a lot to download, lol). But if you use a few, then I highly doubt it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜