I have an iMac 2012 27" with a defective screen, but with its graphic card being OK.
I have placed the iMac just behind my 42" 4K TV and it works pretty well with its 4K resolution.
Only caveat is the refresh rate of 25Hz, which does not harm with static tasks like browsing mainly non-video contents.
The iMac runs at 5% load...
The refresh rate is limited by the port protocol, which is DP1,1 I guess.
Your iMac 27" has GT755M (or the better GTX660m), which is 50% more powerful than the GT640m in 21.5" iMac.
But still, handling webpages with video content (or other moving picture contents) on 4k resolution display is still a heavy workload for it.
I suggest one stick with 2k or 1080p resolutions for better web-surfing experience.