Test Your Wix Code Site with Server-Side Rendering

A little while ago, we announced that starting soon, your Wix Code sites will start loading faster in certain circumstances, thanks to the magic of server-side rendering. (Sites that do not contain code are already rendered on the server when viewed on mobile devices). Many of you have asked for a way to test your site, to see if it will be ready when sites begin to be rendered on the server.

Here we explain how you can temporarily force your site to render server-side now, before it will be rendered server-side for your users. This allows you to test whether your code will work as expected when server-side rendering is implemented for your users.

Note: The instructions below assume you are using the Chrome browser.

  1. Open your published site in your browser.

  2. Open your browser’s developer tools (Mac: Cmd + Opt + I, Windows: Ctrl + Shift + I).

  3. Simulate a mobile user agent by clicking " Toggle device toolbar " and choosing a mobile device from the dropdown on the device toolbar.

  4. Add ?forceSsr=true to the end of your site’s URL in the address bar and press Enter.


Now you can test your site with server-side rendering.
Note:

  1. Only your published site is rendered on the server. You cannot check your site in preview mode.

  2. Your site will only render on the server with the additional URL parameter and only in mobile view.

3 Likes

Hey
I can’t get this to work, see here.


The first code snippet checks if renderCycle === 1 which would be serverside so the environment should not be browser and the timestamps should be different between server and browser right?

I am not sure what Wix did overnight, but I am having issue with the menu bar on mobile site. It is not showing up now at all. I deleted and re-added the menu bar and published again. still not showing up. I noticed a difference in loading speed overnight, so an update must have been done which also explains why the menu bar isn’t loading. Please fix ASAP!

ALSO, lightboxes do not work either! Please fix!

www.matkowsky.ca is our site.

Hi John,

Please note that this is a Wix Code forum and this section is focused on new product updates.
If your issue is not related to wix code, please contact Wix Support .
If your issue is related to Wix Code, please post a new thread in our Q&A section .

Liran.

Hi Andreas,

Thanks for the quick response. A small issue we seem to have is that in case we are in the server typeof renderCycle is string while it is a number in the client. Until we will fix this, try:
if (wix.window.rendering.renderCycle === ‘1’).

Thanks,
Yaara

Hey
Ok now after I changed that to string comparison it works.


Any ideas when this would be testable on desktop?

WIX SLASHES ORGANIC MOBILE LOAD TIMES: NIPS ONE MORE LONG TIME PERFORMANCE NAG STRAIGHT IN THE REARS!

Ok, I have not found anything I can directly link in terms of troubles. I did run into some weird things lately on my code-based pieces of the site but I strongly doubt it had anything to do with SSR as it was occurring on non-ssr too. Anyway.

THIS STUFF THOUGH:
For a minute there when testing one of my production sites alexthedefender.com and its SSR alt of Houston Attorney | Alexander J. Houthuijzen, Attorney-at-Law on my computers and phone on fast connections I could not AT ALL TELL the difference in load speed changes. in fact, they were persistently identical with regular beating SSR in some occasions. I timed it numerous times.

Then I recognized I am testing the wrong scenario for the situation because obviously Wix would not mention they are working on this for what 6-10 months and deliver and I see no difference. Checked Google pagespeed, 1% improvement from non SSR to SSR from 98% on both mobile and desktop to 99%. Ok great, but what on earth am I missing here guys? Ran tests on webpagetest.org, cannot really find out much difference there either whether i run on mobile or desktop or on dsl or on 3g.

:bulb: UNTIL :bulb:
See, my office has this poor geographical positioning that results in it being a near total blind spot for my cell carrier, I hardly ever get half to a single bar around here, on best days when the skies and stars and winds line up, I may get 2 bars if I try to find that sweet spot. So I gave the comparison test a go with a stopwatch and the results BLEW. ME. AWAY.

Turns on out on 1 bar 4G:
NON SSR loads in 9.x seconds
SSR time to first paint was 3.6 seconds

On 100/6Mbps cable-powered and fully accommodating wifi
NON SSR first paint in 3.7
SSR first paint in 3.9 seconds

Device: S8+ on latest Chrome & with latest Android updates

confirmed similarly and very obviously different results on CRAPPIER connections with a few friends of mine who always complain the sites I build are too slow and virtually everyone agreed this one is an IMPROVEMENT.

I made a bet with myself over Brazilian steaks soon… I no touch adwords for this site… next week… bounce rate will drop by some 20-30%, possibly more. Bet is on 20% haha and that is a pretty good drop for no effort! Well non by me at least this time :sunglasses:

:tophat: My hats off to you guys who pulled this and made it happen.
Such happy, much respect. That is all.
Omid

Oh yeah, I am going to publish this elsewhere too with some modifications :slight_smile:

Hey Andreas and all,

The small bug with the renderCycle type has been fixed. It is now returning a number from the backend and the client.

So your code should test for this condition:

if (wix.window.rendering.renderCycle === 1)

What next?

Repeat of my test above at another random spot with poor signal was
26 seconds for regular
6 seconds for SSR
same site

this clearly will have an impact on bounce rates and I just cannot wait to see that impact.

It will be fully released the 11th, thats tomorrow. I have also made some major discovery with this. It seem to be able to speed things up in an extreme way.

Site seems to start loading 5 seconds faster, which would be huge step in the right direction.

My all pages load in just 2 sec but the pages having dataset in it loads in 15 sec

When do we expect the server-side to be integrated into the full desktop website?

I’ve spent weeks learning to code with Wix only to find the site load speed is atrocious!!!

I wouldn’t mind so much about the PREMIUM price they charge PER WEBSITE …IF my site loaded in a reasonably fast time but 15-20 or even 40 seconds sometimes is A JOKE!

https://books.uk.net

If a website doesn’t load in less than 5 seconds nowadays, you might as well chuck most of your advertising budget down a drain because visitors WILL NOT WAIT - why should they?

My site doesn’t use the Wix databases at all so I can only assume Wix servers/network is overloaded/oversold. It’s such a shame but sadly I will be leaving just as soon as I find a more RELIABLE and FASTER website hosting provider!

So thanks Wix, for wasting weeks of my time and let this be a WARNING to others who are thinking Wix is the bees knees. If you join Wix, you will be paying TOP dollar for a poor website experience for your visitors AND you will not be able to use any code you have written at Wix so you’ll have to start from scratch like me - I’m so annoyed GRRRR!

Hey
All the sites I do with Wix or Wix Code loads below 3 secs. Even the heaviest www.sunlight.se loads below 4 seconds, that site is super heavy in images and code on the landing page.

I don’t think it’s fair play to yell on Wix when there is an external script that takes over 30 seconds to load. You should always inspect your pages in a tool where you can inspect and see loading times per script.

Brian Alderson, give me pm via galleriaprinthouse.com (use footer contact form) and let me take a look at your properties properly. Explain to me exactly what loads slow and maybe even include a little gif or video link for it. Fixing such issues is like what I do for a living man. But agreed, Wix is not instant in load nor the best. all wix sites still take a good 2-3 sec before showing anything while the “leading” standard is ever pushing for zero.

I say “leading” because let’s be fair, always compare to real world apples v apples of what you get vs. price you pay in time and money and see if competitors of your size are able to get anything better. One prime example is ecommerce, ecommerce sites generally load very slow compared to non-e-commerce and yours seems to be filled with html widgets pulling affiliate amazon links. Also think about values you add to the internet. Google hates empty affiliate sites.

Karen, :joy: cheers. But I got this, don’t worry about it :wink:

Thanks for your comments guys.

The Wix site only pulls about 30kb of Amazon info off the API so I don’t see how that would slow things down?

Subsequent pulls (when the paging buttons are clicked) load in quickly and I don’t have any problem with that. It’s the very first initial page load time that’s annoying. I’ll try setting up an auto ping to my API to keep the server awake, see if that helps…

p.s. I was really pissed off when I posted as I hate wasting time on stuff :slight_smile: - Sorry Wix.

I am sorry if my answer offended you, I just try to help :frowning: I know the feeling of being angry on stuff when it does not work :slight_smile: Hope you get it all to work. Maybe you could add the script inside using the embed function or try to cache it. Sorry again.

Hey Andreas, your answer didn’t offend me at all. I really appreciate your help my friend :slight_smile:
thanks