What is the alternative to .ajax in jQuery?
In other words, I want to do a regular, non-AJAX request, but using Javascript. I'm researching this because I have to enable 开发者_开发知识库the back button in my site.
Huh? There is no "alternative". XMLHttpRequest is the only way of doing an HTTP request inside the page to my knowledge. If you want a synchronous request then do async:false
.
You can do location.href
, history.pushState
or window.open
but those aren't the same. You can also use jQuery bbq if you want back/forward.
精彩评论