[kronolith] Administratively disable download of sound notifications
Jan Schneider
jan at horde.org
Fri Jun 20 09:55:19 UTC 2014
Zitat von Anthony Messina <amessina at messinet.com>:
> On Friday, June 20, 2014 11:00:18 AM Jan Schneider wrote:
>> Zitat von Anthony Messina <amessina at messinet.com>:
>> > On Friday, June 20, 2014 09:48:18 AM Jan Schneider wrote:
>> >> Zitat von Anthony Messina <amessina at messinet.com>:
>> >> > Is there a way to disable the download of the notification sound
>> >> > files at the administrative level, or even the user level? I have my
>> >>
>> >> No.
>> >>
>> >> > Kronolith notification preferences set to "Inline, Email, No Sound",
>> >> > but every time I click in Kronolith (dynamic interface), requests
>> >> > for the sound files are issued creating unecessary connections and
>> >> > downloads:
>> >> >
>> >> >
>> >> > "GET /horde/kronolith/ HTTP/1.1" 200 23910
>> >> > "GET /horde/themes/default/sounds/doorbell.wav HTTP/1.1" 200 5168
>> >> > "GET /horde/themes/default/sounds/jetsndb.wav HTTP/1.1" 200 31256
>> >> > "GET /horde/themes/default/sounds/gnid3.wav HTTP/1.1" 200 13688
>> >> > "GET /horde/themes/default/sounds/reminder.wav HTTP/1.1" 200 23151
>> >> > "GET /horde/themes/default/sounds/theetone.wav HTTP/1.1" 200 24776
>> >> > "GET /horde/themes/default/sounds/doorbell.wav HTTP/1.1" 200 5168
>> >> > "GET /horde/themes/default/sounds/jetsndb.wav HTTP/1.1" 200 31256
>> >> > "GET /horde/themes/default/sounds/reminder.wav HTTP/1.1" 200 23151
>> >> > "GET /horde/themes/default/sounds/gnid3.wav HTTP/1.1" 200 13688
>> >> > "GET /horde/themes/default/sounds/theetone.wav HTTP/1.1" 200 24776
>> >> >
>> >> >
>> >> > I did a fair amount of work in Kronolith yesterday and found that
>> >> > over 16MB total for the day had been transferred just for these
>> >> > sound files (which I thought I disabled with "No Sound").
>> >>
>> >> Those should only be loaded when opening the event form and selecting
>> >> inline notifications. At least that's what FF does.
>> >
>> > Thanks, Jan. This is what I see with FF. Though I would expect that even
>> > using inline notification, since I have set "No Sound", the files
>> > would not be
>> > requested.
>> >
>> > Also do you think it would be reasonable to have these sound files
>> > requested using something like "If-Modified-Since" HTTP header, to
>> > improve client-side caching of these files that are not likely to change?
>>
>> All this is completely up to the plugin implementing the audio playing
>> in your client system.
>
> The client system I am using to test this is Firefox. I am using
> "inline" and
> "email" notification. I am under the assumption that "inline" means the
> little orange box in the lower right corner of the browser window.
>
> I don't see how Firefox is entirely responsible for requesting sound
> files (or
> not) if I have chosen "No Sound" in my preferences, unless Kronolith is
> generating content which tells Firefox to do so...
>
> That being said, grepping through horde/kronolith/index.php, It appears that
> they are being downloaded as part of the "Load Ajax interface" section where
> the sound files are embedded in the page:
>
> foreach (Horde_Themes::soundList() as $key => $val) {
> $sound = htmlspecialchars($key);
> $value = sprintf('<li><input type="radio" id="%s%s" %s
> value="%s" /> <embed autostart="false" src="%s" /> %s</li>',
>
> I'm guessing this is because I can override my Kronolith preference of "No
> Sound" when I create or modify an event and choose "inline" notification.
>
> However the files are loaded upon entry into Kronolith, and again
> when I click
> in the calendar window to create or modify an event:
>
> "GET /horde/themes/default/sounds/doorbell.wav HTTP/1.1" 200 5168
> "GET /horde/themes/default/sounds/gnid3.wav HTTP/1.1" 200 13688
> "GET /horde/themes/default/sounds/jetsndb.wav HTTP/1.1" 200 31256
> "GET /horde/themes/default/sounds/reminder.wav HTTP/1.1" 200 23151
> "GET /horde/themes/default/sounds/theetone.wav HTTP/1.1" 200 24776
> "POST /horde/services/ajax.php/kronolith/listTopTags HTTP/1.1" 200 142
>
> Perhaps the first load on entry to the calendar could be avoided, since they
> are requested again when an AJAX request is performed to create or modify an
> event.
>
> -A
Again, how these are loaded and whether they are cached depends on
your client. Firefox does *not* play WAV files itself, there's always
some plugin doing this.
--
Jan Schneider
The Horde Project
http://www.horde.org/
https://www.facebook.com/hordeproject
More information about the kronolith
mailing list