Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5953027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:45:59+00:00 2026-05-22T17:45:59+00:00

I have built a website with CodeIginer and I want to implement AJAX and

  • 0

I have built a website with CodeIginer and I want to implement AJAX and JQuery in one of my pages. The problem is that when I load the content, the URL does not change.

Let’s say that I have these URI:

  • http://www.example.com/controller/function/param
  • http://www.example.com/controller/function/param2

How can I change from the first one to the second one when I click a button?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:45:59+00:00Added an answer on May 22, 2026 at 5:45 pm

    In HTML5 you can change the URL:

    window.history.pushState("object or string", "Title", "/new-url");
    

    check http://spoiledmilk.com/blog/html5-changing-the-browser-url-without-refreshing-page/

    docs: https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history#The_pushState().c2.a0method


    UPDATE

    An overview of which browser support the new HTML5 history API:

    http://caniuse.com/#search=pushState (caniuse.com is worth to bookmark!)

    there are already frameworks that do the hard work for you and even gracefully fallback to the common hash-tag solution:

    History.js

    History.js gracefully supports the HTML5 History/State APIs
    (pushState, replaceState, onPopState) in all browsers. Including
    continued support for data, titles, replaceState. Supports jQuery,
    MooTools and Prototype. For HTML5 browsers this means that you can
    modify the URL directly, without needing to use hashes anymore. For
    HTML4 browsers it will revert back to using the old onhashchange
    functionality.

    Backbone.js

    Backbone supplies structure to JavaScript-heavy applications by
    providing models with key-value binding and custom events, collections
    with a rich API of enumerable functions, views with declarative event
    handling, and connects it all to your existing application over a
    RESTful JSON interface.
    …
    pushState support exists on a purely opt-in basis in Backbone.
    Older browsers that don’t support pushState will continue to use
    hash-based URL fragments, and if a hash URL is visited by a
    pushState-capable browser, it will be transparently upgraded to the true URL.

    Mootools (via Plugin)

    MooTools is a compact, modular, Object-Oriented JavaScript framework designed for the intermediate to advanced JavaScript developer. […] History Management via popstate or hashchange. Replaces the URL of the page without a reload and falls back to Hashchange on older
    browsers.

    dojo toolkit

    Dojo saves you time and scales with your development process, using web standards as
    its platform. It’s the toolkit experienced developers turn to for building high
    quality desktop and mobile web applications. […] dojox.app manage the navigation
    history through HTML5 pushState standard and delegate it to browser enabled
    history management.

    … just to name a few.


    (!!) BE AWARE

    One important side-effect when using the pushState (citation from the Backbone documentation):

    Note that using real URLs requires your web server to be able to
    correctly render those pages
    , so back-end changes are required as
    well. For example, if you have a route of /documents/100, your web
    server must be able to serve that page, if the browser visits that URL
    directly. For full search-engine crawlability, it’s best to have the
    server generate the complete HTML for the page … but if it’s a web
    application, just rendering the same content you would have for the
    root URL, and filling in the rest with Backbone Views and JavaScript
    works fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a website and when my users load up http://info.salemgolfclub.org/Account/Logon the username
I have the website built in Ec2. I want to put all images in
I have recently built a template for a website that I see looks slightly
I have a website built in PHP 4 with a framework made by hand
I have a website built using Asp.net and LinqToSql for Data Access. In a
I have a website I've built in VS2005, C#, .NET 2.0. This website does
I have built an MSI that I would like to deploy, and update frequently.
I have built an application in C# that I would like to be optimized
I have built a .dll under WinXP that claims it can't find DWMAPI.DLL when
I have built my website in Django. And like any other django project I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.