小编use*_*110的帖子

Can I use non latin characters in my robots.txt and sitemap.xml?

Can I use non latin characters in my robots.txt file and sitemap.xml like this?

robots.txt

User-agent: *
Disallow: /somefolder/

Sitemap: http://www.domainwithåäö.com/sitemap.xml
Run Code Online (Sandbox Code Playgroud)

sitemap.xml

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>http://www.domainwithåäö.com/</loc></url>
<url><loc>http://www.domainwithåäö.com/subpage1</loc></url>
<url><loc>http://www.domainwithåäö.com/subpage2</loc></url>
</urlset>
Run Code Online (Sandbox Code Playgroud)

Or should I do like this?

robots.txt

User-agent: *
Disallow: /somefolder/

Sitemap: http://www.xn--domainwith-z5al6t.com/sitemap.xml
Run Code Online (Sandbox Code Playgroud)

sitemap.xml

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>http://www.xn--domainwith-z5al6t.com/</loc></url>
<url><loc>http://www.xn--domainwith-z5al6t.com/subpage1</loc></url>
<url><loc>http://www.xn--domainwith-z5al6t.com/subpage2</loc></url>
</urlset>
Run Code Online (Sandbox Code Playgroud)

sitemap robots.txt punycode domain-name

5
推荐指数
1
解决办法
404
查看次数

不需要在所有链接上添加标题吗?

我了解一些SEO,但我想问:

如果没有针对该单词或页面进行优化(例如指向“联系页面”的链接,我懒得在 Google 上排名靠前),是否有必要在链接上添加标题。或者谷歌是否重视所有链接都有标题?

<a href="/contact" title="Unnecessary title">Click here to contact us</a>
<a href="/contact">Click here to contact us</a>
Run Code Online (Sandbox Code Playgroud)

我的想法是:

仅在以下情况下添加标题

a) 你想帮助页面在谷歌上排名。

或者

b) 如果您关心黄色的小悬停消息。

html seo title

4
推荐指数
1
解决办法
5306
查看次数

完全相同的代码在Dreamweaver中不起作用

有时当我从jsfiddle将javascript复制到Dreamweaver时,我最终还是撞到了墙上.两个带有(看起来是)完全相同的javascript的文档不能以相同的方式工作.

在文档AI中有以下代码:

<script>
alert('test')
</script>
Run Code Online (Sandbox Code Playgroud)

在文档BI中有以下代码(不起作用):

<script>
alert('test')
?</script>
Run Code Online (Sandbox Code Playgroud)

注意:请将代码B复制到html文档中,并在给我评论之前尝试提醒它.我不是在开玩笑,有一些奇怪的事情发生.

我已经将问题定位为结束脚本标记,但我看不出代码有什么问题.

什么是文件A和B的代码差异?

html javascript dreamweaver

1
推荐指数
1
解决办法
1374
查看次数

我应该和不应该在javascript中缓存什么?

我知道缓存将多次使用的对象是个好主意.但是如果我多次使用以下内容呢:

var chacheWindow = window;
var chacheDocument = document;
var chacheNavigator = navigator;
var chacheScreen = screen;
var chacheWindowLocationHash = window.location.hash;
var chacheDocumentBody = document.body;
Run Code Online (Sandbox Code Playgroud)

也许在两者之间徘徊是件好事<html></html>?请解释.

javascript caching

0
推荐指数
1
解决办法
58
查看次数