3 ms·
> I admit I'm not familiar with that. But how would it deal with clients without JS support? One could include two attributes: <a href="/foobar" ic-get-fr
by scwoodal 10y ago
> I admit I'm not familiar with that. But how would it deal with clients without JS support?
One could include two attributes:
<a href="/foobar" ic-get-from="/foobar">foobar</a>
There's likely some edge cases that would fail doing it this way, like when including other inputs outside of the form tags when submitting forms.
- xg15 10y agoAs I understood it, the whole idea of intercooler is to fetch HTML snippets via ajax and embed them into the page client-side. Your fallback would require server-side logic to decide whether to return the snippet or render the whole page client-side. That's just as complex as fallback for a traditional SPA.
- scwoodal 10y agoThere are a few different strategies when using intercooler. If clients not having java script available is a big concern the server can always return fully rendered pages and have intercooler pick out the elements from the response that need to be updated on the page. This gives clients that do have java script the feel of an SPA and clients that do not have java script see the traditional full page refresh without any additional server side logic deciding to return snippets or not.