question

SunitaJodha-1503 avatar image
0 Votes"
SunitaJodha-1503 asked SunitaJodha-1503 commented

Change Browser tab title name for SharePoint Modern site

I have an intranet Communication site. My requirement is to display Page title as the Browser tab title without Site name with - prefix. Please suggest how we can update this for modern site.

office-sharepoint-online
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@SunitaJodha-6878 ,

This may be achieved by injecting JS modifies document.title to the SharePoint Online modern page. I'm testing on this and will back to you soon.

0 Votes 0 ·
AllenXu-MSFT avatar image
0 Votes"
AllenXu-MSFT answered SunitaJodha-1503 commented

Hi @SunitaJodha-6878 ,

Sorry for the delay. You can inject below JS code to the modern page and then the browser tab title will get updated to the text you typed in the "Your Title Goes Here".

 <script type="text/javascript">
   document.title = "Your Title Goes Here";
 </script>

If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the reply. I will try this approach.

0 Votes 0 ·
linyus avatar image
0 Votes"
linyus answered

You should have a spfx solution, the solution can help for inject JavaScript.
Then you can inject JS for your request.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.