最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

seo - How to control how Sitemap XML is displayed in browser? - Stack Overflow

programmeradmin2浏览0评论

If you look at the sitemap here at .xml there is no style sheet attached and and it is being displayed as a source code in one of the PC I am accessing. Here is the screenshot.

However, on another PC, it is displayed like this - where just xml content elements are displayed.

I also noticed that sometimes in one browser, it is displayed as source code as in first image, and sometimes it is displayed just as text elements all jumbled-up as in second image. Opening from same browser or different browser - private windows too - it is displayed sometimes as jumbled-text and sometime as pretty formatted xml.

How can I control, how it is being displayed by browser. I have a client who is asking me to fix it and want to display it as in first image.

I know that I can attach style-sheet to make it pretty, but in that case xml element like url, loc, lastmod will not be displayed and I can just apply styles to the contents. Moreover, this doesn't make a difference and an xml sitemap without stylesheet is just fine for search engines and no impact for SEO.

I want to know is there any way to control how it is being displayed - I want to display it like in first image. How can I do it?

发布评论

评论列表(0)

  1. 暂无评论