jquery - Is dynamic content reloaded on a resize event triggered? -


i want load different picture depending on window width. i've built empty divide in body of document , i'm going set content (the image source) means of jquery script.

now want changing orientation of device new query triggered, i've put code in resize method.

what happens if resize event triggered , picture has loaded same previous 1 (suppose screen size changes 799px 800px)? loaded anyway wasting bandwidth or isn't loaded again?

generally, no. however, behavior depends on caching definition set server , compatibility of client used (there shouldn't issues standard browsers).

as suggested above, can use developer tools (network tab) enter image description hereto check whether resource has been reloaded. need check whether got standard 200 response, 200 (from cache) response or 304 (not modified). major difference between 200 (from cache) , 304 response, 304 request issued server , server respond 304, means cached item valid (a request issued content not re-downloaded), while 200 (from cache), no request issued server. can learn more 2 here.

another alternative use fiddler, if reason can't access dev tools.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -