Skip to content
Browse files

Smarter cache disabling for images

  • Loading branch information
koenbok committed Jun 16, 2014
1 parent 2ed6bab commit f34db1c21b96d99e2d671418fad1084c202f29e6
Showing with 1 addition and 1 deletion.
  1. +1 −1 framer/
@@ -364,7 +364,7 @@ class exports.Layer extends BaseClass
# imageUrl = Config.baseUrl + imageUrl

# If the file is local, we want to avoid caching
if Utils.isLocal()
if Utils.isLocal() and not (_.startsWith(imageUrl, "http://") or _.startsWith(imageUrl, "https://"))

This comment has been minimized.

Copy link

tisho Jun 17, 2014


Could probably avoid the overhead of calling _.startsWith twice by replacing this with a regex:

if Utils.isLocal() and not imageUrl.match(/^https?:\/\//)

This comment has been minimized.

Copy link

koenbok Jun 17, 2014

Author Owner


imageUrl += "?nocache=#{}"

# As an optimization, we will only use a loader

0 comments on commit f34db1c

Please sign in to comment.