-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added check for if source has already been updated
- Loading branch information
1 parent
a602b7f
commit c4e45c1
Showing
1 changed file
with
4 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c4e45c1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phonegap (and maybe other mobile app frameworks) must handle ajax HEAD requests strangely, as in my app if retina() was called numerous times (after adding content to the page via ajax for example), the image src would become example-2x-2x.jpg
Even without the Phonegap issue, if the retina() function is called numerous times, this reduces the number of ajax requests which are made to check if the image exists.
It does mean that a normal, non-retina image (which needs switching), can't be named with -2x. However this seems rare, and if needed, retina_part can be changed accordingly.