开发者

Jquery, AJAX and URL changes

开发者 https://www.devze.com 2022-12-25 07:17 出处:网络
Jquery, AJAX and URL changes... I have a galle开发者_运维知识库ry, and when the image change i would like to change my url to \"#image_id=321\"

Jquery, AJAX and URL changes...

I have a galle开发者_运维知识库ry, and when the image change i would like to change my url to "#image_id=321" and when i load an url with this appended: "#image_id=321", loads the image with id 321.

is this possible to make without the "#" and using "/photo-id/321"? thanks


Update: Time moves on, while the below was true at the time of writing, we now we have pushState and friends as used by Github.


No. If you change anything more than the fragment identifier, you change the page, and it is no longer Ajax.

As a rule of thumb, if the information is significant enough to bookmark, then Ajax is probably going to cause more harm than good.

0

精彩评论

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

关注公众号