开发者

Using # in links instead of GET params = faster?

I just noticed that say

http://s7.addthis.com/js/250/addthis_widget.js#pub=PUBID

does the equivalent of

http://s7.addthis.com/js/250/addthis_widget.js?pub=fct-250

but is much faster. How does that work? O_o

I'm including the above links in a < script src call. 开发者_StackOverflow Its supposedly faster according to one of the addthis developers. Seems to work faster for me as well. I can't grok their source so, I'm not sure why this technique would work faster.


More details? Where are you calling this from?

It won't make a difference when loading up the URL, because the request still has to go to the server and back. However, if you're setting this in a page via javascript or anchor tags, it won't cause a full page refresh, but instead will just move the page the specified position.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜