You'll want to review the Trailhead Visualforce & Lightning Experience Module. In particular, look at the "Managing Navigation" section. If you want your pages to be compatible with both Classic and Lightning you'll need to create your navigation links using action methods. Don’t create the link by building a string with a static pattern like
link = '/' + accountId + '/e'. Instead, use
Most important, Don’t try to set
window.location directly (you literally can't access the DOM). This will not work in Lightning because of the "Lightning Wrapper" that serves Visualforce pages inside of an I-frame to a user. This architecture prevents Visualforce pages from accessing the browser window. Visualforce pages are served-up from an entirely different server than Lightning Pages. Even their session Id is different than Lightning pages. See the documentation I referred to for more on this.