I have a busy photo website that is currently making a new page request every time a user wants to load another page of results. I would now like to implement an AJAX/AJAX style paging effect, to only the gallery part of the page.
I can do this in jQuery/JS loading the different pages via AJAX but is this also possible, as a cheat, to use an iFrame? So when a user searches, post the input to the iFrame target and when they select a page number, post that to the iFrame target.
I ask this because I know there are some good uses of iFrames and bad ones. I would like to make sure this isn’t one of the bad ones. I have read about browser back buttons causing issues with using iFrames. Will this be an issue here, if it’s a good idea of course?
You could look into jQuery’s
.load()function here. That’s what I’d recommend. the iFrame will still make a new page request. As well,.load()actually builds the content into your page, not just in a framed page. Looks a little more professional, works a little better, and isn’t as heavy on the server (though 1 page load isn’t much to it)