natashawylie / iviewer

image viewer plugin for jquery
233 stars 97 forks source link

Additional GET requests when removing src attr #31

Closed vitaliy-sushko closed 11 years ago

vitaliy-sushko commented 12 years ago

Problem caused by this part of code (lines 883-887): self._img .removeAttr("src") .removeAttr("width") .removeAttr("height") .removeAttr("style") .css({ position: "absolute", top :"0px", left: "0px"})

it looks like .removeAttr("src") triggers some browsers (this problem appears in Safary 4.0.3 Win, Safary 5.1.7 Mac, MSIE 7-8) to perform GET request to same page URL. As a transitory solution I've removed .removeAttr("src") (line 884) and this is solved the issue.

can3p commented 12 years ago

I couldn't reproduce this. Can you tell, how to get additional requests? I've tried to catch all requests with fiddler, and it seems that only necessary requests are made.

levi2 commented 12 years ago

hey stumbled by accident on this.. its a safari "bug" if an image hast its src removed or src="" then safari loads the root page