# Getting site ready for Server-Side Rendering

**URL:** <https://forum.wixstudio.com/t/getting-site-ready-for-server-side-rendering/26127>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [March 9, 2018, 9:40am UTC](https://forum.wixstudio.com/t/getting-site-ready-for-server-side-rendering/26127 "2018-03-09T09:40:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_anno](https://avatars.discourse-cdn.com/v4/letter/_/b3f665/32.png) [@\_anno](https://forum.wixstudio.com/u/_anno)\
**Post date:** [March 9, 2018, 9:40am UTC](https://forum.wixstudio.com/t/getting-site-ready-for-server-side-rendering/26127/1 "2018-03-09T09:40:56Z")

</div>

Hi,  
My Plant Library site (domain [www.theplantlibrary.co.za](http://www.theplantlibrary.co.za/) ) looks terrible on small/ mobile screens as the text and image galleries overlap, and it looks as though each gallery is added twice. Perfect on a desktop - although pages load very, very slowly. I’m trying to work out if and where to add the suggested code. If the first part of my page codes look like this:

**imp** ort {local} from “wix-storage”;  
const linkField = “link-Plants-title”;

$w.onReady(function () {  
setUrls(’ [#grasslandTrees](https://www.wix.com/code/home/forum/search/posts%3Fquery=%23grasslandTrees) ‘, ‘trees’);  
setUrls(’ [#grasslandShrubs](https://www.wix.com/code/home/forum/search/posts%3Fquery=%23grasslandShrubs) ‘, ‘shrubs’);  
setUrls(’ [#grasslandPerennials](https://www.wix.com/code/home/forum/search/posts%3Fquery=%23grasslandPerennials) ‘, ‘perennials’);  
setUrls(’ [#grasslandSucculents](https://www.wix.com/code/home/forum/search/posts%3Fquery=%23grasslandSucculents) ‘, ‘succulents’);  
setUrls(’ [#grasslandGroundcovers](https://www.wix.com/code/home/forum/search/posts%3Fquery=%23grasslandGroundcovers) ‘, ‘groundcovers’);  
setUrls(’ [#grasslandBulbs](https://www.wix.com/code/home/forum/search/posts%3Fquery=%23grasslandBulbs) ‘, ‘bulbs’);  
setUrls(’ [#grasslandGrass](https://www.wix.com/code/home/forum/search/posts%3Fquery=%23grasslandGrass) ', ‘grass’);  
});  
function setUrls(datasetSelector, galleryCategory) {  
$w(datasetSelector).onReady(() =\> {  
const numberOfItems = $w(datasetSelector).getTotalCount();  
$w(datasetSelector).getItems(0, numberOfItems)  
.then( (result) =\> {

**do** I add your code below? If so, where, and what do I replace the [#myText](https://www.wix.com/code/home/forum/search/posts%3Fquery=%23myText) with?

import {local} from ‘wix-storage’;

import wixWindow from ‘wix-window’;

$w.onReady( function () {

if (wixWindow.rendering.env === “browser”) {

$w(" [#myText](https://www.wix.com/code/home/forum/search/posts%3Fquery=%23myText) ").text = local.getItem(“key”);  
}  
} );  
}
