开发者

Is there any easy way to change the address bar background?

I would like to change the address bar background in either Firefox or Internet Explorer t开发者_如何学运维o indicate weather I am running the test application or the live. Is there any easy way to do it using HTML, Javascript or ASP.NET ?


This is not possible. it would be annoying if the website changes the color of your address bar and make it the same color of the text font.

How ever if you want to distinguish your current environment, why don't you simply assign a different Favicon for each versions.


In Chrome, I use different profiles with different themes to distinguish between two different clients. You just need to make sure to use the correct browser for what you're trying to do.

basically, set up a link to

chrome.exe --user-data-dir=[profile dir]

You can do the same thing in FireFox


Not at all. Browsers don’t expose that kind of UI to pretty much anything except plug-ins. I'd recommend just coloring an element on the page differently depending on the test/production version of the app.


it's probably easier to change the body background instead. I don't think any browser would let you do that.


Can you just put something in the web application itself by using a web.config setting?

<html>
<head>
</head>
<body style="margin:0px 0px 0px 0px;">
<div style="width:100%; top:50px; background-color:red; text-align:center;">--- Production Environment ---</div>
</body>
</html>

Is there any easy way to change the address bar background?


There is only 1 way I can think of and it requires HTTPS. Most browsers now have 3 tiers of certificates: standard from a trusted authority, self signed, and Extended Validation. If you use different types for testing and live, the address bar will look different.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜