socket.emit - Event name [socket.io]

I use:

Server:

socket.emit('news', 'ZZZ');

Client:

socket.on('news', function (data) {
    document.querySelector('#gamesList').innerHTML = data;
});

All is working!

But if i change event name to a "temp":

Server:

socket.emit('temp', 'ZZZ');

Client:

socket.on('temp', function (data) {
    document.querySelector('#gamesList').innerHTML = data;
});

It's not working! Why? I can't use my own event names?

Thank in advance!

Answers


Clear your browser's cache.

If you use the "Symfony 2 Framework", correctly use "assetic".


Need Your Help

How do I create a List of Dictionaries in .NET?

c# .net list dictionary

I am trying to create a List of Dictionary<string,int> items. I am not sure how to add items in list and how to get back the values while traversing the list. I want to use it in C#, like so:

Injection of autowired dependencies failed

spring spring-transactions spring-annotations

I'm trying to realize the same as in Spring error when trying to manage several classes that share a common base class?