JavaScript: Change Page Title in Browser dynamically
Tip by Anja Proggy | 2013-11-08 at 03:06
If you want to change the title of a website dynamically using JavaScript, you can just use this simple line:
<script type="text/javascript"> document.title = 'My New Title'; </script>
You only have to set a string to "document.title" and the title shown in the browser is changing.
Please note: it is not a good idea to use this function for search engine optimization (SEO) reasons, because most search engines are ignoring JavaScript, so that this script does not have any effect. But of course, you can use the script to give users a better orientation when dynamically changing the content of the web page.
About the Author
The author has not added a profile short description yet.
Show Profile
Related Topics
MySQL: Line Breaks in MySQL
Tip | 0 Comments
jQuery: Send HTML5 Canvas to Server via Ajax
Tutorial | 0 Comments
HTML5: Upload Images with Client Side Resize
Tutorial | 9 Comments
How to resize Image before Upload in Browser
Tutorial | 13 Comments
How to Replace multiple Texts at the same Time
Tutorial | 0 Comments
XAMPP: How to set up SSL/HTTPS for local Projects
Tutorial | 4 Comments
Windows Batch Script: Computer Shutdown
Tutorial | 2 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.