mediawiki-extensions-Multim.../tests/browser/features
Gilles Dubuc 28b8f5095e Use cross-origin img attribute instead of data URI
After lots of experimenting with Wireshark and
current Chrome + Firefox on Ubuntu 13.10, this is my
current understanding of the caching when preloading images
with AJAX requests:

* on Chrome, the image request always comes from browser cache
* Firefox makes two separate requests by default
* Firefox with img.crossOrigin = 'anonymous' makes two separate
  requests, but the second one is a 304 (does not load the
  image twice)
* when the image has already been cached by the browser (but not in
  this session), Chrome skips both requests; Firefox skips the AJAX
  request, but sends the normal one, and it returns with 304.

"wish I knew this when I started" things:
* the Chrome DevTools has an option to disable cache. When this is
  enabled, requests in the same document context still come from
  cache (so if I load the page, fire an AJAX request, then without
  reloading the page, fire an AJAX request to the same URL, then the
  second request will be cached), but an AJAX request - image request
  pair is an exception from this.
* when using Ctrl-F5 in Firefox, requests on that page will never hit
  the cache (even AJAX request fired after user activity; even if
  two identical requests follow each other). When using clear cache
  + normal reload, this is not the case.
* if the image does not have an Allow-Origin header and is loaded
  with crossOrigin=true, Firefox will refuse to load it. Chrome will
  log an error in the console saying it refused to load it, but will
  actually load it.
* Wireshark rocks.

Pushed some tech debt (browser + domain whitelist) into other tickets:
https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/232
https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/233

Reverted commits:
    8a8d74f01d.
    63021d0b0e.

Change-Id: I84ab2f3ac0a9706926adf7fe8726ecd9e9f843e0
Bug: 61542
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/207
2014-02-24 07:56:40 +00:00
..
step_definitions Use cross-origin img attribute instead of data URI 2014-02-24 07:56:40 +00:00
support Remove fire_event("onfocus") from next/previous/exit actions, not needed 2014-02-20 14:00:26 -08:00
basic_mmv_navigation.feature @login tag is required for tests to be able to log in at Jenkins machine 2014-01-22 14:51:17 +01:00