tag:blogger.com,1999:blog-5682413770770674096.post2489557499927389722..comments2024-01-07T10:01:04.001-05:00Comments on Michael Angstadt's Blog: A Javascript script with query string parameters?Michael Angstadthttp://www.blogger.com/profile/04809821580827426849noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-5682413770770674096.post-9867070958555795092017-01-25T03:37:37.781-05:002017-01-25T03:37:37.781-05:00Thanks again for your post, Michael. I really real...Thanks again for your post, Michael. I really really appreciate that someone noticed this handy trick. Cheers! :) :) :)Anonymoushttps://www.blogger.com/profile/13022023773648364578noreply@blogger.comtag:blogger.com,1999:blog-5682413770770674096.post-38485034751226040252015-05-22T09:13:09.708-04:002015-05-22T09:13:09.708-04:00You could pass a rel tag with the parameter... :)You could pass a rel tag with the parameter... :)Santyhttps://www.blogger.com/profile/06123439767944453904noreply@blogger.comtag:blogger.com,1999:blog-5682413770770674096.post-14831081829646566722012-07-18T19:41:57.463-04:002012-07-18T19:41:57.463-04:00Yes the fragment identifier is not passed to the s...Yes the fragment identifier is not passed to the server, it's only read by the browser.Michael Angstadthttps://www.blogger.com/profile/04809821580827426849noreply@blogger.comtag:blogger.com,1999:blog-5682413770770674096.post-40984407569249197692012-07-18T16:18:49.112-04:002012-07-18T16:18:49.112-04:00Yep, exactly. Those are treated as different conte...Yep, exactly. Those are treated as different content by browsers, proxies, CDNs, ... anything that caches content. Additionally, there are some older proxies out there that will not cache content period if there is a query string present. Of course, if you actually do need to read the parameters server-side (perhaps maybe you serve the script dynamically), then the fragment identifier would not be an option.Jasonhttps://www.blogger.com/profile/04955728457572467529noreply@blogger.comtag:blogger.com,1999:blog-5682413770770674096.post-90112249756249117002012-06-19T14:09:35.728-04:002012-06-19T14:09:35.728-04:00Hi Jason. Thanks for the comment I like that idea...Hi Jason. Thanks for the comment I like that idea. Putting the parameters in the fragment identifier is probably better because it won't effect the caching of the JS file. Using query string parameters, a browser may assume that the URLs "file.js?one=value1" and "file.js?one=value2" contain different data and thus might cache them as two separate files.Michael Angstadthttps://www.blogger.com/profile/04809821580827426849noreply@blogger.comtag:blogger.com,1999:blog-5682413770770674096.post-20185350374525261782012-06-11T10:17:41.824-04:002012-06-11T10:17:41.824-04:00I think a better approach is to accept those param...I think a better approach is to accept those parameters in the url hash, rather than the query string. Query string parameters can affect caching, which means performance may be degraded. (I believe some proxies will not cache content with query strings at all. And additionally if any parameter values are dynamic, they obviously would affect caching).Jasonhttps://www.blogger.com/profile/04955728457572467529noreply@blogger.com