Jump to content

uniGUI Does Change FavIcon Dinamically (and page title)


Recommended Posts


As you may have noticed it is not possible to change your page's FavIcon (ServerModule.FavIcon) at runtime without a page reload.

This example changes the FavIcon and is great for notification as it occurs on sites like Twitter, FaceBook, etc ...

JS has been improved and now avoids caching problems on change and supports use of PNG on the fly. And as a bonus, how to change the page title.

Have a good time

Visit http://www.unigui.com.br for project packs, exclusive material, demos, examples, books, and our full-fledged RDP course.
Several other examples also available for free from our official website.

-----------------------------------------------------------------------------------------

Como você pode ter percebido não é possivel mudar o FavIcon de sua página (ServerModule.FavIcon) em tempo de execução sem um reload da página.

Este exemplo mudar o FavIcon e é ótimo para notificação como ocorre em sites como Twitter, FaceBook, etc...

O JS foi melhorado e agora evita problemas de cache na mudança e suporta uso d PNG na hora. E como bonus, como mudar o titulo da página.

Divirta-se

 

 

 

 

www.unigui.com.br-uniGUIDoesFavIcon.gif

Project available at https://www.unigui.express

  • Like 3
  • Thanks 1
  • Upvote 2
Link to comment
Share on other sites

Updated with an animated GIF and typo in title.

Better use 100x100 pixels on gif otherwise you will see nothing.

With this example you can use ICO, PNG and GIF without change the JS code and update on the fly. Gives a new look and same as the big players like Twitter, Facebook, Instagram.

have a nice day !

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...